public class JSONEventListener extends Object implements EventListener
| Constructor and Description |
|---|
JSONEventListener()
Creates a listener object that is not ready until
setOutputStream(OutputStream) is
invoked |
JSONEventListener(OutputStream outputStream)
Creates a new listener that immediately starts writing to an OutputStream
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
event(Event event)
Reports an event
|
void |
setOutputStream(OutputStream outputStream) |
void |
setResource(Object resource)
Set a resource to handle events
|
public JSONEventListener()
setOutputStream(OutputStream) is
invokedpublic JSONEventListener(OutputStream outputStream) throws IOException
outputStream - output stream to write JSON object toIOException - if an IO error occurspublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic void event(Event event)
EventListenerevent in interface EventListenerevent - to reportpublic void setOutputStream(OutputStream outputStream) throws IOException
IOExceptionpublic void setResource(Object resource) throws Exception
EventListenersetResource in interface EventListenerresource - used to handle eventsException - if the resource is of an unrecognized type or implementation fails to use itCopyright © 2016–2021 FIX Trading Community. All rights reserved.