public interface AbstractMessage
Modifier and Type | Method and Description |
---|---|
boolean |
canProcess(java.io.InputStream istream)
Checks whether the given input stream can be read/written by this message.
|
boolean |
isArmed()
Has the message successfully been loaded with payload?
|
boolean |
isValid()
Determines whether the message contents are valid and can be used.
|
boolean |
read(java.io.InputStream istream)
Reads the message contents from the given input stream.
|
boolean |
write(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generates response message data with the given servlet response.
|
boolean |
write(java.io.OutputStream ostream,
java.lang.String encoding)
Generates response message data with the given output stream.
|
boolean canProcess(java.io.InputStream istream)
BufferedInputStream
and mark the position before
this method is called. Reset the stream when the method has done its job to allow other
messages to perform another lookahead properly.
istream
- Input stream with incoming messagejava.lang.NullPointerException
- Parameter was null
boolean read(java.io.InputStream istream) throws java.io.IOException
istream
- Input stream with incoming messagejava.io.IOException
- An I/O error occurredjava.lang.NullPointerException
- Parameter was null
boolean write(java.io.OutputStream ostream, java.lang.String encoding) throws java.io.IOException
ostream
- Output stream for outgoing messageencoding
- Encoding for stream, may be null
java.io.IOException
- An I/O error occurredjava.lang.NullPointerException
- Parameter was null
boolean write(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
request
- Servlet request with incoming messageresponse
- Servlet response for outgoing messagejava.io.IOException
- An I/O error occurredjava.lang.NullPointerException
- Parameter was null
boolean isArmed()
boolean isValid()
Copyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.