tourguide
Class SMSProcessor

java.lang.Object
  extended bycom.ericsson.hosasdk.api.hui.IpAppHosaUIManagerAdapter
      extended bytourguide.SMSProcessor
All Implemented Interfaces:
com.ericsson.hosasdk.api.hui.IpAppHosaUIManager, com.ericsson.hosasdk.api.ui.IpAppUIManager, com.ericsson.hosasdk.api.IpInterface

public class SMSProcessor
extends com.ericsson.hosasdk.api.hui.IpAppHosaUIManagerAdapter
implements com.ericsson.hosasdk.api.hui.IpAppHosaUIManager

Implements handlers for SMS interactions. This class is heavily based on a sample code provided with NRG SDK.


Constructor Summary
SMSProcessor(com.ericsson.hosasdk.api.hui.IpHosaUIManager aHosaUIManager, ServiceLogic service)
          Initializes instance variables.
 
Method Summary
 void hosaSendMessageErr(int anAssignmentID, com.ericsson.hosasdk.api.TpHosaSendMessageError[] anErrorList)
          Processes a failed SMS send notification.
 void hosaSendMessageRes(int anAssignmentID, com.ericsson.hosasdk.api.TpHosaSendMessageReport[] aResponseList)
          Processes a sucessful SMS send notification.
 com.ericsson.hosasdk.api.ui.IpAppUI reportEventNotification(com.ericsson.hosasdk.api.ui.TpUIIdentifier anUserInteraction, com.ericsson.hosasdk.api.ui.TpUIEventNotificationInfo anEventInfo, int anAssignmentID)
          Called by the UI manager to report a notification.
 com.ericsson.hosasdk.api.ui.IpAppUI reportNotification(com.ericsson.hosasdk.api.ui.TpUIIdentifier anUserInteraction, com.ericsson.hosasdk.api.ui.TpUIEventInfo anEventInfo, int anAssignmentID)
          Called by the UI manager to report a notification.
 void sendSMS(java.lang.String aSender, java.lang.String aReceiver, java.lang.String aMessageContent)
          Sends SMS.
 int startNotifications(java.lang.String aDestinationAddress)
          Enables SMS receiving (starts notifications).
 void stopNotifications(int anAssignmentId)
          Disables SMS receiving (stops notifications).
 
Methods inherited from class com.ericsson.hosasdk.api.hui.IpAppHosaUIManagerAdapter
dispose, hosaMessageDeliveryNotification, notImplemented, userInteractionAborted, userInteractionNotificationContinued, userInteractionNotificationInterrupted
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ericsson.hosasdk.api.hui.IpAppHosaUIManager
hosaMessageDeliveryNotification, userInteractionAborted, userInteractionNotificationContinued, userInteractionNotificationInterrupted
 

Constructor Detail

SMSProcessor

public SMSProcessor(com.ericsson.hosasdk.api.hui.IpHosaUIManager aHosaUIManager,
                    ServiceLogic service)
Initializes instance variables.

Parameters:
aHosaUIManager - a User Interactions manager (NRG object).
service - the service logic object that will process SMS messages.
Method Detail

hosaSendMessageErr

public void hosaSendMessageErr(int anAssignmentID,
                               com.ericsson.hosasdk.api.TpHosaSendMessageError[] anErrorList)
Processes a failed SMS send notification.

Specified by:
hosaSendMessageErr in interface com.ericsson.hosasdk.api.hui.IpAppHosaUIManager
See Also:
IpAppHosaUIManager

hosaSendMessageRes

public void hosaSendMessageRes(int anAssignmentID,
                               com.ericsson.hosasdk.api.TpHosaSendMessageReport[] aResponseList)
Processes a sucessful SMS send notification.

Specified by:
hosaSendMessageRes in interface com.ericsson.hosasdk.api.hui.IpAppHosaUIManager
See Also:
IpAppHosaUIManager

reportEventNotification

public com.ericsson.hosasdk.api.ui.IpAppUI reportEventNotification(com.ericsson.hosasdk.api.ui.TpUIIdentifier anUserInteraction,
                                                                   com.ericsson.hosasdk.api.ui.TpUIEventNotificationInfo anEventInfo,
                                                                   int anAssignmentID)
Called by the UI manager to report a notification. This is supposed to be the replacement for the deprecated reportNotification , but it is not invoked by the current NRG.

Specified by:
reportEventNotification in interface com.ericsson.hosasdk.api.hui.IpAppHosaUIManager

reportNotification

public com.ericsson.hosasdk.api.ui.IpAppUI reportNotification(com.ericsson.hosasdk.api.ui.TpUIIdentifier anUserInteraction,
                                                              com.ericsson.hosasdk.api.ui.TpUIEventInfo anEventInfo,
                                                              int anAssignmentID)
Called by the UI manager to report a notification. NRG Core SDK doc claims this function is deprecated, but NRG is still using it !

Specified by:
reportNotification in interface com.ericsson.hosasdk.api.hui.IpAppHosaUIManager
See Also:
IpAppHosaUIManager

sendSMS

public void sendSMS(java.lang.String aSender,
                    java.lang.String aReceiver,
                    java.lang.String aMessageContent)
Sends SMS.

Parameters:
aSender - sender of the SMS
aMessageContent - textual content of the SMS

startNotifications

public int startNotifications(java.lang.String aDestinationAddress)
Enables SMS receiving (starts notifications). Invoked from ServiceLogic.

Parameters:
aDestinationAddress - destination address (a 'phone number') of the service
Returns:
an assignment ID of the created notification.

stopNotifications

public void stopNotifications(int anAssignmentId)
Disables SMS receiving (stops notifications). Invoked from ServiceLogic.

Parameters:
anAssignmentId - the ID obtained from the startNotifications method