Package org.objectweb.joram.mom.proxies
Interface ProxyMessageSender
-
- All Known Implementing Classes:
TcpConnection
public interface ProxyMessageSenderAProxyMessageSendersends messages (ProxyMessage) to a client. Messages can be sent synchronously by directly callingsendor asynchronously by executing a task (if allowed by theProxyMessageSender).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the connection used by thisProxyMessageSenderto send messages to the client.voidexecute(Runnable task)Executes a task.booleanisExecutor()States whether executing a task is allowed.voidsend(ProxyMessage msg)Sends a message to the client.
-
-
-
Method Detail
-
send
void send(ProxyMessage msg) throws Exception
Sends a message to the client.- Parameters:
msg- the message to be sent- Throws:
Exception- if an error occurs
-
isExecutor
boolean isExecutor()
States whether executing a task is allowed.- Returns:
trueif executing a task is allowed;falseotherwise.
-
execute
void execute(Runnable task)
Executes a task.- Parameters:
task- task to be executed
-
close
void close()
Closes the connection used by thisProxyMessageSenderto send messages to the client.
-
-