|
HPSearch | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
cgl.hpsearch.engine.URIBindings.NBNativeStreamHandler
Handler for writing / reading to /from a Broker. NBNativeStreamHandler is a
re-implementation of BrokerNetworkBridge using nbNative interface rather than
JMS interface to connect to a broker.
Policy for Handling EOF
The first byte in every "BytesMessage" message denotes the type of data
If the first byte is STX (byte 2) then the rest of the message is data, else
if the first byte is EOT (byte 4) then it denotes end of transmission (or
EOF) in our case
| Field Summary |
| Fields inherited from interface cgl.hpsearch.common.SystemConstants |
ABANDON_HANDLER, ABANDONED, BROKER_HOST, BROKER_PORT, BUF_SIZE, EOT, EXCEPTION, FAILURE, FILESEPARTOR, FLOW_LOGGING_MANAGER, FLOW_MANAGER, HPSEARCH_CONFIG, HPSEARCH_HOME, HPSEARCH_SHELL, HPSEARCH_WS, MARKER, NB_HOME, NB_PERFORMANCE_DATA_TOPIC, OS_TYPE, OS_UNIX, OS_WIN, PORT, PROTOCOL, READY, RESUME, RUNNING, SCRIPT_ARGS, SCRIPT_PATH, SHELLWS_PORT, START_HANDLER, STREAM_MARKER_DATA, STREAM_MARKER_EOF, STX, SUCCESS, SUSPEND, TASK_DEFINED, TASK_SCHEDULER_ENGINE, TASKSCHEDULER_AUTO_CONNECT_COMM_LINK, TASKSCHEDULER_ENGINE_COMM_LINK, THREAD_SLEEP_INTERVAL, UNKNOWN, WAITING, WSCONTEXT_RESULT_BIN, WSCONTEXT_SERVICE |
| Constructor Summary | |
NBNativeStreamHandler(String connectionURI)
|
|
NBNativeStreamHandler(String hostName,
int portNum,
String transportType,
String brokerStream)
|
|
NBNativeStreamHandler(String hostName,
int portNum,
String transportType,
String brokerStream,
String configFilePath)
|
|
NBNativeStreamHandler(String connectionURI,
String configFilePath)
|
|
| Method Summary | |
void |
close()
Closes the Broker connection and terminated Client services. |
void |
flush()
NOT IMPLEMENTED... |
InputStream |
getInputStream()
Get the Input stream |
OutputStream |
getOutputStream()
Get the Output Stream |
void |
onEvent(NBEvent nbEvent)
|
void |
write(byte[] buf)
Writes buf to the topic to which this instance is subscribed to |
void |
write(byte[] buf,
int offset,
int len)
Writes a part of the byte buffer buf to the topic to which this instance is subscribed to |
void |
write(int i)
NOT IMPLEMENTED... |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NBNativeStreamHandler(String connectionURI)
public NBNativeStreamHandler(String connectionURI,
String configFilePath)
public NBNativeStreamHandler(String hostName,
int portNum,
String transportType,
String brokerStream)
public NBNativeStreamHandler(String hostName,
int portNum,
String transportType,
String brokerStream,
String configFilePath)
| Method Detail |
public InputStream getInputStream()
public OutputStream getOutputStream()
public void onEvent(NBEvent nbEvent)
onEvent in interface NBEventListener
public void write(byte[] buf,
int offset,
int len)
throws IOException
buf - A byte array containing the data to publishoffset - An int representing the offset in the buffer buflen - An int representing the length of array to send.
IOException
public void write(byte[] buf)
throws IOException
buf - A byte array containing the data to publish
IOException
public void write(int i)
throws IOException
IOExceptionOutputStream.write(int)
public void flush()
throws IOException
IOExceptionOutputStream.flush()public void close()
OutputStream.close()
|
HPSearch | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||