public abstract class BasicProtocolHandler extends Object implements Referenceable, DispatchTarget
Modifier | Constructor and Description |
---|---|
protected |
BasicProtocolHandler()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
auth(BasicProtocolActor from,
AuthDesc auth,
OptString label)
JSON method for the 'auth' message.
|
void |
debug(BasicProtocolActor from,
String msg)
JSON method for the 'debug' message.
|
void |
disconnect(BasicProtocolActor from)
JSON method for the 'disconnect' message.
|
void |
ping(BasicProtocolActor from,
OptString tag)
JSON method for the 'ping' message.
|
void |
pong(BasicProtocolActor from,
OptString tag)
JSON method for the 'pong' message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ref
@JSONMethod(value={"?auth","label"}) public void auth(BasicProtocolActor from, AuthDesc auth, OptString label)
recv: { to:REF, op:"auth", auth:AUTHDESC,
label:optSTR }
send: no reply is sent
from
- The connection over which the message was received.auth
- Authorization information being offered.label
- Descriptive label for this connection, for logging.@JSONMethod(value="msg") public void debug(BasicProtocolActor from, String msg)
recv: { to:ignored, op:"debug",
msg:STR }
send: no reply is sent
from
- The connection over which the message was received.msg
- Text to write to the server log;@JSONMethod public void disconnect(BasicProtocolActor from)
recv: { to:ignored, op:"disconnect" }
send: there is no reply, since the connection is closed
from
- The connection over which the message was received.@JSONMethod(value="tag") public void ping(BasicProtocolActor from, OptString tag)
recv: { to:REF, op:"ping",
tag:optSTR }
send: { to:asReceived, op:"pong",
tag:asReceived }
from
- The connection over which the message was received.tag
- Optional tag string; if provided, it will be included in the
reply.@JSONMethod(value="tag") public void pong(BasicProtocolActor from, OptString tag)
recv: { to:ignored, op:"pong",
tag:optSTR }
send: no reply is sent
from
- The connection over which the message was received.tag
- Optional tag string, which should echo the tag (if any) from
the 'ping' message that caused this 'pong' to be sent.Copyright © 2017. All rights reserved.