|
xmlBlaster 1.6.2 client API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.client.StreamingCallback
StreamingCallback
| Field Summary | |
static java.lang.String |
ENTRY_CB_SESSION_ID
|
| Constructor Summary | |
StreamingCallback(Global global,
I_StreamingCallback callback)
|
|
StreamingCallback(Global global,
I_StreamingCallback callback,
long waitForChunksTimeout,
long waitForClientReturnTimeout,
boolean useQueue)
|
|
| Method Summary | |
void |
reachedAlive(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess notifying the client that a connection has been established and that its status is now ALIVE. |
void |
reachedDead(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess informing the client that the connection was lost (i.e. |
void |
reachedPolling(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess informing the client that the connection state has changed to POLLING. |
int |
sendInitialQueueEntries()
|
void |
timeout(java.lang.Object userData)
It is used here to inform the user update method that a timeout occured, it will throw an IOException when reading the in stream of the update method. |
java.lang.String |
update(java.lang.String cbSessId,
UpdateKey updKey,
byte[] cont,
UpdateQos updQos)
This is the callback method invoked from I_XmlBlasterAccess informing the client in an asynchronous mode about a new message. |
java.lang.String |
updateNewMessage(java.lang.String cbSessId,
UpdateKey updKey,
byte[] cont,
UpdateQos updQos)
|
java.lang.String |
updateStraight(java.lang.String cbSessId,
UpdateKey updKey,
byte[] cont,
UpdateQos updQos)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ENTRY_CB_SESSION_ID
| Constructor Detail |
public StreamingCallback(Global global,
I_StreamingCallback callback)
throws XmlBlasterException
public StreamingCallback(Global global,
I_StreamingCallback callback,
long waitForChunksTimeout,
long waitForClientReturnTimeout,
boolean useQueue)
throws XmlBlasterException
callback - | Method Detail |
public final int sendInitialQueueEntries()
throws XmlBlasterException
XmlBlasterException
public java.lang.String updateStraight(java.lang.String cbSessId,
UpdateKey updKey,
byte[] cont,
UpdateQos updQos)
throws XmlBlasterException,
java.io.IOException
XmlBlasterException
java.io.IOExceptionI_Callback.update(java.lang.String, org.xmlBlaster.client.key.UpdateKey, byte[], org.xmlBlaster.client.qos.UpdateQos)
public java.lang.String updateNewMessage(java.lang.String cbSessId,
UpdateKey updKey,
byte[] cont,
UpdateQos updQos)
throws XmlBlasterException,
java.io.IOException
XmlBlasterException
java.io.IOExceptionI_Callback.update(java.lang.String, org.xmlBlaster.client.key.UpdateKey, byte[], org.xmlBlaster.client.qos.UpdateQos)
public java.lang.String update(java.lang.String cbSessId,
UpdateKey updKey,
byte[] cont,
UpdateQos updQos)
throws XmlBlasterException
I_Callback
update in interface I_CallbackcbSessId - The session ID specified by the client which registered the callback.
You can specify a cbSessionId during connection (with ConnectQos)
and this is bounced back here so you can authenticate the message.updKey - The arrived key containing the topic namecont - The arrived message content. This is your payload.
XmlBlasterExceptionI_Callback.update(java.lang.String, org.xmlBlaster.client.key.UpdateKey, byte[], org.xmlBlaster.client.qos.UpdateQos)public void timeout(java.lang.Object userData)
timeout in interface I_TimeoutuserData - You get bounced back your userData which you passed
with Timeout.addTimeoutListener()I_Timeout.timeout(java.lang.Object)
public void reachedAlive(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListenerNote that this method is invoked also when the connection has been established the first time. In this case the connection is fully operational but your connect() call has not yet returned. You can access the returned connect QoS in this case with connect.getConnectReturnQos().
You can erase all entries of the queue manually or add others before you return and in this way control the behavior. During you have control in reachedAlive() the client side queue is blocked and does not accept publish or request messages from other threads. So you can do peacefully your work (your thread is allowed to modify the queue exclusively).
If you send messages during this method invocation they are queued only and are sent as soon as this method returns.
This method is invoked by the login polling thread from I_XmlBlasterAccess.
reachedAlive in interface I_ConnectionStateListeneroldState - The previous state of the connection.I_ConnectionStateListener.reachedAlive(org.xmlBlaster.util.dispatch.ConnectionStateEnum, org.xmlBlaster.client.I_XmlBlasterAccess)
public void reachedDead(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListener
reachedDead in interface I_ConnectionStateListeneroldState - The previous state of the connection.
public void reachedPolling(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListener
reachedPolling in interface I_ConnectionStateListeneroldState - The previous state of the connection.
|
xmlBlaster 1.6.2 client API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||