com.ibm.btt.channel.sms
Class SMSPresentationHandler
java.lang.Object
com.ibm.btt.clientserver.DSEPresentationHandler
com.ibm.btt.channel.sms.SMSPresentationHandler
- All Implemented Interfaces:
- PresentationHandler
public class SMSPresentationHandler
- extends DSEPresentationHandler
The BTT pre-builded presentationHandler to handle the response sent to SMS gateway.
Application can override getContent method to return specific content as HTTP response of inbound request
Method Summary |
protected java.lang.String |
getContent(ChannelContext channelContext)
Get content as http response for inbound request. |
void |
processException(ChannelContext channelContext,
java.lang.Exception exception)
Process the exception of the server side.
1.Send "Server internal error" SMS upon general exception
2.Send notification SMS when request is rejected by channel policy (ChannelPolicyException)
3.Send specific SMS upon SMS command is not validate (SMSCommandInvalidException) |
void |
processReply(ChannelContext channelContext,
java.lang.Object operation)
Set HTTP response for inbound request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SMSPresentationHandler
public SMSPresentationHandler()
processReply
public void processReply(ChannelContext channelContext,
java.lang.Object operation)
- Set HTTP response for inbound request.
- Specified by:
processReply
in interface PresentationHandler
- Overrides:
processReply
in class DSEPresentationHandler
- Parameters:
channelContext
- the channelContext objectoperation
- the BTT operation
processException
public void processException(ChannelContext channelContext,
java.lang.Exception exception)
- Process the exception of the server side.
1.Send "Server internal error" SMS upon general exception
2.Send notification SMS when request is rejected by channel policy (ChannelPolicyException)
3.Send specific SMS upon SMS command is not validate (SMSCommandInvalidException)
- Specified by:
processException
in interface PresentationHandler
- Overrides:
processException
in class DSEPresentationHandler
- Parameters:
channelContext
- the channelContext objectexception
- the exception throws by the server side
getContent
protected java.lang.String getContent(ChannelContext channelContext)
- Get content as http response for inbound request.
Return with empty string by default. Application can ovrride this method to respond SMS inbound request with specific data
- Parameters:
channelContext
-
- Returns:
- empty string as http response for inbound request
(c) Copyright IBM Corporation 1998, 2011