|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deacon.DeaconObservable
org.deacon.DeaconService
public class DeaconService
Implements the core operation of the Deacon Meteor client.
Constructor Summary | |
---|---|
DeaconService(java.lang.String host,
java.lang.Integer port)
Creates a new DeaconService |
Method Summary | |
---|---|
int |
catchUpTimeOut()
Get the timeout after which Deacon will no longer try to retrieve pushes missed while shut down (This applies to all subscriptions) Will return "0" if no timeout. |
void |
catchUpTimeOut(java.lang.Integer seconds)
Set the timeout after which Deacon will no longer try to retrieve pushes missed while shut down (This applies to all subscriptions) |
java.lang.Boolean |
checkChannel(java.lang.String chan)
Checks to see if the DeaconService is subscribed to the specified channel |
boolean |
isRunning()
Checks the status of the DeaconService |
void |
joinChannel(java.lang.String chan,
java.lang.Integer backtrack)
Adds a subscription in the DeaconService to the specified Meteor server channel |
void |
leaveChannel(java.lang.String chan)
Unsubscribes this DeaconService from the specified Meteor channel; Takes effect after the present polling interval terminates. |
void |
start()
Initiates or re-opens the connection with the Meteor server |
void |
stop()
Closes the connection to the Meteor server; Takes effect after the present polling interval terminates. |
java.lang.String |
toString()
Returns a description of the DeaconService |
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 |
---|
public DeaconService(java.lang.String host, java.lang.Integer port) throws java.net.UnknownHostException, java.io.IOException, java.lang.Exception
host
- Meteor server to which this client should connectport
- TCP port on Meteor server that is awaiting connections
java.net.UnknownHostException
- if host is unreachable
java.io.IOException
- if connection cannot be established
java.lang.Exception
- if port value is invalidMethod Detail |
---|
public void catchUpTimeOut(java.lang.Integer seconds)
seconds
- The timeout in seconds (0 = no timeout)public int catchUpTimeOut()
public void joinChannel(java.lang.String chan, java.lang.Integer backtrack)
chan
- The channel name on the Meteor serverbacktrack
- The number of previously-pushed messages to retrieve upon subscribingpublic java.lang.Boolean checkChannel(java.lang.String chan)
chan
- The channel to check
public void leaveChannel(java.lang.String chan)
chan
- The channel name on the Meteor serverpublic void start() throws java.lang.Exception
java.lang.Exception
- if Deacon is already running when the start() method is calledpublic void stop()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isRunning()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |