|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMessagingService
An IMessagingService provides the methods for sending messages to remote endpoints. IMessagingService enables the sending of request-response style messages and fire-forget style messages.
Method Summary | |
---|---|
void |
deregisterAllVerbHandlers(EndPoint localEndPoint)
Deregister all verbhandlers corresponding to localEndPoint. |
void |
deregisterVerbHandlers(java.lang.String type)
Deregister a verbhandler corresponding to the verb from the Messaging Service. |
IVerbHandler |
getVerbHandler(java.lang.String verb)
This method returns the verb handler associated with the registered verb. |
void |
listen(EndPoint ep)
Listen on the specified port. |
void |
listenUDP(EndPoint ep)
Listen on the specified port. |
void |
registerVerbHandlers(java.lang.String type,
IVerbHandler verbHandler)
Register a verb and the corresponding verb handler with the Messaging Service. |
void |
sendOneWay(Message message,
EndPoint to)
Send a message to a given endpoint. |
java.lang.String |
sendRR(Message[][] messages,
EndPoint[][] to,
IAsyncCallback cb)
Send a message to a given endpoint. |
java.lang.String |
sendRR(Message[] messages,
EndPoint[] to,
IAsyncCallback cb)
Send a message to a given endpoint. |
IAsyncResult |
sendRR(Message message,
EndPoint to)
Send a message to a given endpoint. |
java.lang.String |
sendRR(Message message,
EndPoint[] to,
IAsyncCallback cb)
Send a message to the given set of endpoints and informs the MessagingService to wait for at least howManyResults responses to determine success
of failure. |
java.lang.String |
sendRR(Message message,
EndPoint to,
IAsyncCallback cb)
Send a message to a given endpoint. |
void |
sendUdpOneWay(Message message,
EndPoint to)
Send a message to a given endpoint. |
void |
stream(java.lang.String file,
long startPosition,
long total,
EndPoint from,
EndPoint to)
Stream a file from source to destination. |
Method Detail |
---|
void registerVerbHandlers(java.lang.String type, IVerbHandler verbHandler)
type
- name of the verb.verbHandler
- handler for the specified verbvoid deregisterAllVerbHandlers(EndPoint localEndPoint)
localEndPoint
- void deregisterVerbHandlers(java.lang.String type)
type
- name of the verb.void listen(EndPoint ep) throws java.io.IOException
ep
- EndPoint whose port to listen on.isHttp
- specify if the port is an Http port.
java.io.IOException
void listenUDP(EndPoint ep)
ep
- EndPoint whose port to listen on.IAsyncResult sendRR(Message message, EndPoint to)
message
- message to be sent.to
- endpoint to which the message needs to be sent
java.lang.String sendRR(Message message, EndPoint[] to, IAsyncCallback cb)
howManyResults
responses to determine success
of failure.
message
- message to be sent.to
- endpoints to which the message needs to be sentcb
- callback interface which is used to pass the responses
java.lang.String sendRR(Message message, EndPoint to, IAsyncCallback cb)
message
- message to be sent.to
- endpoint to which the message needs to be sentcb
- callback interface which is used to pass the responses or
suggest that a timeout occurred to the invoker of the send().
suggest that a timeout occurred to the invoker of the send().
java.lang.String sendRR(Message[] messages, EndPoint[] to, IAsyncCallback cb)
messages
array is sent to the ith element in the to
array.This method assumes
there is a one-one mapping between the messages
array and
the to
array. Otherwise an IllegalArgumentException will be thrown.
This method also informs the MessagingService to wait for at least
howManyResults
responses to determine success of failure.
messages
- messages to be sent.to
- endpoints to which the message needs to be sentcb
- callback interface which is used to pass the responses or
suggest that a timeout occured to the invoker of the send().
java.lang.String sendRR(Message[][] messages, EndPoint[][] to, IAsyncCallback cb)
messages
array is sent to the ith element in the to
array.This method assumes
there is a one-one mapping between the messages
array and
the to
array. Otherwise an IllegalArgumentException will be thrown.
The idea is that multi-groups of messages are grouped as one logical message
whose results are harnessed via the IAsyncResult
messages
- groups of grouped messages.to
- destination for the groups of messagescb
- the callback handler to be invoked for the responses
void sendOneWay(Message message, EndPoint to)
message
- messages to be sent.to
- endpoint to which the message needs to be sentvoid sendUdpOneWay(Message message, EndPoint to)
message
- messages to be sent.to
- endpoint to which the message needs to be sentvoid stream(java.lang.String file, long startPosition, long total, EndPoint from, EndPoint to)
file
- name of file to stream.startPosition
- position inside the filetotal
- number of bytes to streamto
- endpoint to which we need to stream the file.IVerbHandler getVerbHandler(java.lang.String verb)
verb
- for which the verb handler is sought
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |