|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.otfeed.support.mock.SpyStreamerFactory
public class SpyStreamerFactory
Wrapper around IStreamerFactory to log content of
frames to the print stream. Useful for testing, tracing,
and debugging.
| Constructor Summary | |
|---|---|
SpyStreamerFactory(IStreamerFactory engine)
Creates new spy with the empty id string, wrapping an instance of IStreamerFactory. |
|
SpyStreamerFactory(java.lang.String id,
IStreamerFactory engine)
Creates new spy with the given id string, wrapping an instance of IStreamerFactory. |
|
| Method Summary | |
|---|---|
IStreamer |
connect(java.lang.String host,
int port)
Creates a connection (synchronously). |
IFormat<java.nio.ByteBuffer> |
getFormat()
Format to use when converting ByteBuffer s to human-readable form. |
java.lang.String |
getId()
Identification string (optional). |
java.io.PrintStream |
getReadLogStream()
Destination for logging the incoming frames. |
java.io.PrintStream |
getWriteLogStream()
Destination for logging the outgoing frames. |
void |
setFormat(IFormat<java.nio.ByteBuffer> val)
Sets format. |
void |
setId(java.lang.String val)
Sets identification sting. |
void |
setReadLogStream(java.io.PrintStream val)
Sets read log stream. |
void |
setWriteLogStream(java.io.PrintStream val)
Sets write log stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpyStreamerFactory(java.lang.String id,
IStreamerFactory engine)
IStreamerFactory.
id - id string.engine - wrapped instance.public SpyStreamerFactory(IStreamerFactory engine)
IStreamerFactory.
engine - wrapped instance.| Method Detail |
|---|
public java.io.PrintStream getReadLogStream()
public void setReadLogStream(java.io.PrintStream val)
val - print stream.public java.io.PrintStream getWriteLogStream()
public void setWriteLogStream(java.io.PrintStream val)
val - print stream.public java.lang.String getId()
public void setId(java.lang.String val)
val - id string.public IFormat<java.nio.ByteBuffer> getFormat()
BufferFormat.
public void setFormat(IFormat<java.nio.ByteBuffer> val)
val - format.
public IStreamer connect(java.lang.String host,
int port)
throws java.io.IOException
IStreamerFactory
connect in interface IStreamerFactoryjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||