|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessagingListener
The base interface for all listener interfaces related to the exchange of messages over the underlying messaging infrastructure. For example, SIFMessagingListener extends this interface for the Schools Interoperability Framework.
| Field Summary | |
|---|---|
static byte |
RX_DISCARD
onMessageReceived return value indicating the message should be discarded |
static byte |
RX_PROCESS
onMessageReceived return value indicating the message should be processed |
static byte |
RX_REPARSE
onMessageReceived return value indicating the message should be reparsed and processed |
| Method Summary | |
|---|---|
void |
onMessageProcessed(byte messageType,
MessageInfo info)
Called when a message has been received by the framework and successfully dispatched to the ADK's message handlers. |
byte |
onMessageReceived(byte messageType,
java.lang.StringBuffer message)
Called when a message has been received by the framework, before it is dispatched to the ADK's message handlers. |
void |
onMessageSent(byte messageType,
MessageInfo info,
java.lang.Object receipt)
Called when a message has been sent by the framework. |
boolean |
onSendingMessage(byte messageType,
MessageInfo info,
java.lang.StringBuffer message)
Called when a message is about to be sent by the framework. |
| Field Detail |
|---|
static final byte RX_PROCESS
static final byte RX_DISCARD
static final byte RX_REPARSE
| Method Detail |
|---|
byte onMessageReceived(byte messageType,
java.lang.StringBuffer message)
throws ADKException
An agent can implement this method to count the number of messages
received, to signal the user interface or other interested parties that
a message has arrived, to examine or change the raw content of incoming
messages before they're dispatched to the framework, or to prevent the
framework from dispatching messages to message handlers. When filtering
messages, return true to allow the framework to process
this message, false to silently discard the message, or
throw an ADKException to return an error to the server.
messageType - A message type constant (e.g. SIFMessagingListener.SIF_EVENT)message - A StringBuffer containing the message to be sent. The
contents of the buffer may be modified by this method.
RX_PROCESS to allow
the framework to process this message; RX_DISCARD to
silently discard the message; or RX_REPARSE if this
method has changed the content of the message parameter
StringBuffer.
ADKException - may be thrown by this method to return an error
acknowledgement to the server
void onMessageProcessed(byte messageType,
MessageInfo info)
throws ADKException
messageType - A message type constant (e.g. SIFMessagingListener.SIF_EVENT)info - The MessageInfo instance associated with the message
ADKException - may be thrown by this method to return an error
acknowledgement to the server
ADKException - An ADKException may be thrown by this method
to return an error acknowledgement to the server
boolean onSendingMessage(byte messageType,
MessageInfo info,
java.lang.StringBuffer message)
An agent can implement this method to filter outbound messages in order
to change the message content or prevent the framework from sending a
message to the server. When filtering messages, return true
to allow the framework to send this message or false to
silently discard the message.
messageType - A message type constant (e.g. SIFMessagingListener.SIF_EVENT)info - The MessageInfo instance associated with the messagemessage - A StringBuffer containing the message to be sent. The
contents of the buffer may be modified by this method.
void onMessageSent(byte messageType,
MessageInfo info,
java.lang.Object receipt)
An agent can implement this method to count the number of messages sent or to signal the user interface or other interested parties that a message has been sent.
messageType - A message type constant defined by a subclass of this interfaceinfo - The MessageInfo instance associated with the messagereceipt - The acknowledgement or receipt returned by the server
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||