|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.bam.AbstractBamService
com.caucho.bam.SimpleBamService
public class SimpleBamService
Abstract class for a service that implements its own BamAgentStream. Simple services will implement both the HmtpService and BamAgentStream interfaces in a single class. This abstract class simplifies the implementation of this kind of service.
| Constructor Summary | |
|---|---|
protected |
SimpleBamService()
|
| Method Summary | |
|---|---|
BamStream |
getAgentStream()
Returns the resource's stream |
protected BamSkeleton |
getBamSkeleton()
|
BamStream |
getBrokerStream()
Returns the stream to the broker |
void |
message(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Callback to handle messages |
void |
messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
Callback to handle messages |
void |
presence(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
General presence, for clients announcing availability |
void |
presenceError(java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
An error response to a client |
void |
presenceProbe(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Presence probe from the server to a client |
void |
presenceSubscribe(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
A subscription request from a client |
void |
presenceSubscribed(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
A subscription response to a client |
void |
presenceUnavailable(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
General presence, for clients announcing unavailability |
void |
presenceUnsubscribe(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
An unsubscription request from a client |
void |
presenceUnsubscribed(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
A unsubscription response to a client |
void |
queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
Handles the query error from a corresponding queryGet or querySet. |
boolean |
queryGet(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Sends a query information call (get), returning true if this handler understands the query class, and false if it does not. |
void |
queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Handles the query response from a corresponding queryGet or querySet. |
boolean |
querySet(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Sends a query update request (set), returning true if this handler understands the query class, and false if it does not. |
void |
setBrokerStream(BamStream brokerStream)
Sets the stream to the broker |
| Methods inherited from class com.caucho.bam.AbstractBamService |
|---|
getAgentFilter, getBrokerFilter, getJid, logData, logValue, onAgentStart, onAgentStop, setJid, startAgent, stopAgent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.caucho.bam.BamStream |
|---|
getJid |
| Constructor Detail |
|---|
protected SimpleBamService()
| Method Detail |
|---|
protected BamSkeleton getBamSkeleton()
public BamStream getBrokerStream()
public void setBrokerStream(BamStream brokerStream)
public BamStream getAgentStream()
getAgentStream in interface BamServicegetAgentStream in class AbstractBamService
public void message(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
message in interface BamStreamto - the target JIDfrom - the source JIDvalue - the message payload
public void messageError(java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
messageError in interface BamStreamto - the target JIDfrom - the source JIDvalue - the message payloaderror - the message error
public boolean queryGet(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
BamStreamqueryResult or queryError to the sender,
using the same id.
queryGet in interface BamStreamid - the query identifier used to match requests with responsesto - the target JIDfrom - the source JID, used as the target for the responsevalue - the query payload
public boolean querySet(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
BamStreamqueryResult or queryError to the sender,
using the same id.
querySet in interface BamStreamid - the query identifier used to match requests with responsesto - the target JIDfrom - the source JID, used as the target for the responsevalue - the query payload
public void queryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value)
BamStream
queryResult in interface BamStreamid - the query identifier used to match requests with responsesto - the target JIDfrom - the source JID, used as the target for the responsevalue - the result payload
public void queryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
BamStream
queryError in interface BamStreamid - the query identifier used to match requests with responsesto - the target JIDfrom - the source JID, used as the target for the responsevalue - the query payloaderror - additional error information
public void presence(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
presence in interface BamStream
public void presenceUnavailable(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
presenceUnavailable in interface BamStream
public void presenceProbe(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
presenceProbe in interface BamStream
public void presenceSubscribe(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
presenceSubscribe in interface BamStream
public void presenceSubscribed(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
presenceSubscribed in interface BamStream
public void presenceUnsubscribe(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
presenceUnsubscribe in interface BamStream
public void presenceUnsubscribed(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
presenceUnsubscribed in interface BamStream
public void presenceError(java.lang.String to,
java.lang.String from,
java.io.Serializable value,
BamError error)
presenceError in interface BamStream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||