org.deacon
Class Deacon

java.lang.Object
  extended by org.deacon.DeaconObservable
      extended by org.deacon.DeaconService
          extended by org.deacon.Deacon

public class Deacon
extends DeaconService

Deacon is the main client class for receiving Meteor push notifications on Android devices.

Deacon is a thin wrapper around DeaconService which isolates Android-specific code to maintain standalone testability of the DeaconService class. Instantiate a Deacon object within an Android app to create a new push notifications client.


Constructor Summary
Deacon(java.lang.String host, java.lang.Integer port, android.content.Context context)
           
 
Method Summary
 android.content.BroadcastReceiver getBroadcastReceiver()
          Method to return the broadcast receiver, you must register this BroadcastReceiver from the Context.
 
Methods inherited from class org.deacon.DeaconService
catchUpTimeOut, catchUpTimeOut, checkChannel, isRunning, joinChannel, leaveChannel, start, stop, toString
 
Methods inherited from class org.deacon.DeaconObservable
register, unregister
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Deacon

public Deacon(java.lang.String host,
              java.lang.Integer port,
              android.content.Context context)
       throws java.net.UnknownHostException,
              java.io.IOException,
              java.lang.Exception
Parameters:
host - The Meteor server to which this client should connect
port - The client port that the Meteor server is listening on (default is usually 4670)
context - The activity that creates this class. Used to register an IntentFilter. // TODO Shouldn't register IntentFilter using context class?
Throws:
java.net.UnknownHostException - if host is unreachable
java.io.IOException - if connection cannot be established
java.lang.Exception - if port value is invalid
Method Detail

getBroadcastReceiver

public android.content.BroadcastReceiver getBroadcastReceiver()
Method to return the broadcast receiver, you must register this BroadcastReceiver from the Context.