com.funambol.push
Class OTAService

java.lang.Object
  extended by com.funambol.push.OTAService
All Implemented Interfaces:
java.lang.Runnable

public class OTAService
extends java.lang.Object
implements java.lang.Runnable

This class implements a service to listen to OTA messages for push notification. The actions to respond to the notifications are deletegated to the PushNotificationListener that can be registered.


Field Summary
static boolean firstSMS
           
static boolean smsHandling
           
static boolean startViaOTA
           
static boolean syncViaSMS
           
 
Constructor Summary
OTAService(java.lang.String smsPort)
          Creates a new instance of OTAMessagesListener
OTAService(java.lang.String smsPort, ThreadPool threadPool)
           
 
Method Summary
 void notifyIncomingMessage(MessageConnection messageConnection)
          Callback Method invoked when an SMS is received on a specific port
 void run()
          Fired in a separated thread by notifyIncomingMessage() when a binary SMS is received
 void setConnection(MessageConnection mc)
           
 void setPushNotificationListener(OTANotificationListener pushListener)
           
 void startService()
          Starts the service.
 void stopService()
          Stop the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

smsHandling

public static boolean smsHandling

syncViaSMS

public static boolean syncViaSMS

startViaOTA

public static boolean startViaOTA

firstSMS

public static boolean firstSMS
Constructor Detail

OTAService

public OTAService(java.lang.String smsPort)
Creates a new instance of OTAMessagesListener


OTAService

public OTAService(java.lang.String smsPort,
                  ThreadPool threadPool)
Method Detail

setPushNotificationListener

public void setPushNotificationListener(OTANotificationListener pushListener)

startService

public void startService()
Starts the service. This service does not require real work to be performed. Instead of having active wait of incoming events, the notify method is invoked from the underlying system. Starting service implies registering this object as SMS listener.


stopService

public void stopService()
Stop the service. This implies closing the connection with the SMS delivery system.


setConnection

public void setConnection(MessageConnection mc)
                   throws java.io.IOException
Throws:
java.io.IOException

notifyIncomingMessage

public void notifyIncomingMessage(MessageConnection messageConnection)
Callback Method invoked when an SMS is received on a specific port


run

public void run()
Fired in a separated thread by notifyIncomingMessage() when a binary SMS is received

Specified by:
run in interface java.lang.Runnable


Copyright © 2001-2009 Funambol.