public interface ProxyMessageSender
ProxyMessageSender
sends messages (ProxyMessage
)
to a client. Messages can be sent synchronously by directly calling
send
or asynchronously by executing a task (if allowed by the
ProxyMessageSender
).Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connection used by this
ProxyMessageSender to
send messages to the client. |
void |
execute(Runnable task)
Executes a task.
|
boolean |
isExecutor()
States whether executing a task is allowed.
|
void |
send(ProxyMessage msg)
Sends a message to the client.
|
void send(ProxyMessage msg) throws Exception
msg
- the message to be sentException
- if an error occursboolean isExecutor()
true
if executing a task is allowed;
false
otherwise.void execute(Runnable task)
task
- task to be executedvoid close()
ProxyMessageSender
to
send messages to the client.Copyright © 2022 ScalAgent D.T.. All rights reserved.