public class Sentence extends Object implements AbstractServerSocket<Sentence>
Sentence
is a series of predicates that a group of socket have to
follow. It makes easy to write one-liner action and uses internally built
actions implementing Serializable
that is typically needed in cluster
environments. Use of Sentence
is preferred to that of action if the
goal is the same.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the socket.
|
Sentence |
send(String event)
Sends a given event without data.
|
Sentence |
send(String event,
Object data)
Sends a given event with data.
|
Sentence |
tag(String... names)
Attaches given tags to the socket.
|
Sentence |
untag(String... names)
Detaches given tags from the socket.
|
public Sentence send(String event)
AbstractServerSocket
send
in interface AbstractServerSocket<Sentence>
public Sentence send(String event, Object data)
AbstractServerSocket
send
in interface AbstractServerSocket<Sentence>
public void close()
AbstractServerSocket
close
in interface AbstractServerSocket<Sentence>
public Sentence tag(String... names)
AbstractServerSocket
tag
in interface AbstractServerSocket<Sentence>
public Sentence untag(String... names)
AbstractServerSocket
untag
in interface AbstractServerSocket<Sentence>
Copyright 2015, The Cettia Project