|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.foundation.net.JSONByteIOFramerFactory
public class JSONByteIOFramerFactory
Byte I/O framer factory for JSON messaging over a byte stream. The framing rule used is: a block of one or more non-empty lines terminated by an empty line (i.e., by two successive newlines).
On input, each block matching this framing rule is regarded as a parseable unit; that is, it is expected to contain one or more syntactically complete JSON messages. The entire block is read into an internal buffer, then parsed for JSON messages that are fed to the receiver.
On output, each message being sent is framed according to this rule.
| Constructor Summary | |
|---|---|
JSONByteIOFramerFactory(Trace msgTrace)
Constructor. |
|
| Method Summary | |
|---|---|
ByteIOFramer |
provideFramer(MessageReceiver receiver,
String label)
Provide an I/O framer for a new connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSONByteIOFramerFactory(Trace msgTrace)
msgTrace - Trace object for logging message traffic.| Method Detail |
|---|
public ByteIOFramer provideFramer(MessageReceiver receiver,
String label)
provideFramer in interface ByteIOFramerFactoryreceiver - Object to deliver received messages to.label - A printable label identifying the associated connection.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||