public class EchoClient extends AdminObject implements ArgRunnable
Constructor and Description |
---|
EchoClient()
JSON-driven constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate(String ref,
Contextor contextor)
Make this object live inside the context server.
|
void |
echo(ServiceActor from,
String text)
Handler for the 'echo' message, which is a reply to earlier an echo
requests sent to the external service.
|
void |
run(Object obj)
Callback that is invoked when the service connection is established or
fails to be established.
|
contextor, ref
auth, debug, disconnect, ping, pong
@JSONMethod public EchoClient()
public void activate(String ref, Contextor contextor)
activate
in interface InternalObject
activate
in class AdminObject
ref
- Reference string identifying this object in the static
object table.contextor
- The contextor for this server.public void run(Object obj)
run
in interface ArgRunnable
obj
- The connection to the echo service, or null if connection
setup failed.@JSONMethod(value="text") public void echo(ServiceActor from, String text) throws MessageHandlerException
MessageHandlerException
Copyright © 2017. All rights reserved.