public class MessagingService
extends java.lang.Object
| Constructor and Description |
|---|
MessagingService() |
| Modifier and Type | Method and Description |
|---|---|
static MessagingService |
getInstance()
Get the single instance of RSPMessagingService
|
int |
getMessageLoss()
Return the message loss
|
int |
getMessageMaxDelay()
Return the maxmum message delay
|
int |
getMessageMinDelay()
Return the minimum message delay
|
void |
register(java.lang.String endPoint,
MessageReceiver messageReceiver)
Register new message receiver to the queue
|
void |
sendMessage(java.lang.String endPoint,
java.lang.String destinationEndPoint,
java.lang.String msgText)
Responsible for sending messages to the target endpoint
|
void |
setMessageDelay(int minDelay,
int maxDelay)
Set the message delay
|
void |
setMessageLoss(int messageLoss)
Set the message loss
|
void |
unRegister(java.lang.String endPoint)
Unregister from the queue with the endpoint
|
public static MessagingService getInstance()
public void register(java.lang.String endPoint,
MessageReceiver messageReceiver)
endPoint - the service endpointmessageReceiver - the message receiver for incoming messagespublic void unRegister(java.lang.String endPoint)
endPoint - the service endpointpublic void sendMessage(java.lang.String endPoint,
java.lang.String destinationEndPoint,
java.lang.String msgText)
endPoint - the sourcedestinationEndPoint - the destinationmsgText - the message informationpublic void setMessageDelay(int minDelay,
int maxDelay)
minDelay - the new minimum message delaymaxDelay - the new maxmum message delaypublic void setMessageLoss(int messageLoss)
messageLoss - the new message losspublic int getMessageLoss()
public int getMessageMinDelay()
public int getMessageMaxDelay()