public class MessageInputStream extends Object implements MessageStream
Constructor and Description |
---|
MessageInputStream(InputStream inputStream) |
MessageInputStream(InputStream inputStream,
Context context) |
Modifier and Type | Method and Description |
---|---|
void |
addMessageHandler(MessageHandler handler) |
void |
addMessageHandler(MessageTemplate template,
MessageHandler handler) |
void |
addTemplateRegisteredListener(TemplateRegisteredListener templateRegisteredListener) |
void |
close() |
Context |
getContext() |
TemplateRegistry |
getTemplateRegistry() |
InputStream |
getUnderlyingStream() |
Message |
readMessage()
Decodes the next message in the input stream if a message is found.
|
void |
registerTemplate(int templateId,
MessageTemplate template) |
void |
reset() |
void |
setBlockReader(MessageBlockReader messageBlockReader) |
void |
setTemplateRegistry(TemplateRegistry registry) |
public MessageInputStream(InputStream inputStream)
public MessageInputStream(InputStream inputStream, Context context)
public Message readMessage()
null
is returned. If a partial
message is encountered a FastException
with error code 104
is thrown (see FastConstants.END_OF_STREAM
).null
if no more messages are encountered in the streamFastException
public void registerTemplate(int templateId, MessageTemplate template)
public void close()
close
in interface MessageStream
public InputStream getUnderlyingStream()
public void addMessageHandler(MessageTemplate template, MessageHandler handler)
addMessageHandler
in interface MessageStream
public void addMessageHandler(MessageHandler handler)
addMessageHandler
in interface MessageStream
public void setTemplateRegistry(TemplateRegistry registry)
public TemplateRegistry getTemplateRegistry()
getTemplateRegistry
in interface MessageStream
public void addTemplateRegisteredListener(TemplateRegisteredListener templateRegisteredListener)
public void reset()
public Context getContext()
public void setBlockReader(MessageBlockReader messageBlockReader)
Copyright © 2006-2013 The LaSalle Technology Group, LLC. All Rights Reserved.