|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.websocket.StreamInbound org.apache.catalina.websocket.MessageInbound
public abstract class MessageInbound
Base implementation of the class used to process WebSocket connections based
on messages. Applications should extend this class to provide application
specific functionality. Applications that wish to operate on a stream basis
rather than a message basis should use StreamInbound
.
Constructor Summary | |
---|---|
MessageInbound()
|
Method Summary | |
---|---|
int |
getByteBufferMaxSize()
Obtain the current maximum size (in bytes) of the buffer used for binary messages. |
int |
getCharBufferMaxSize()
Obtain the current maximum size (in characters) of the buffer used for binary messages. |
protected void |
onBinaryData(InputStream is)
This method is called when there is a binary WebSocket message available to process. |
protected abstract void |
onBinaryMessage(ByteBuffer message)
This method is called when there is a binary WebSocket message available to process. |
protected void |
onTextData(Reader r)
This method is called when there is a textual WebSocket message available to process. |
protected abstract void |
onTextMessage(CharBuffer message)
This method is called when there is a textual WebSocket message available to process. |
void |
setByteBufferMaxSize(int byteBufferMaxSize)
Set the maximum size (in bytes) of the buffer used for binary messages. |
void |
setCharBufferMaxSize(int charBufferMaxSize)
Set the maximum size (in characters) of the buffer used for textual messages. |
Methods inherited from class org.apache.catalina.websocket.StreamInbound |
---|
getOutboundByteBufferSize, getOutboundCharBufferSize, getReadTimeout, getWsOutbound, onClose, onData, onOpen, onUpgradeComplete, setOutboundByteBufferSize, setOutboundCharBufferSize, setUpgradeOutbound, setUpgradeProcessor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageInbound()
Method Detail |
---|
protected final void onBinaryData(InputStream is) throws IOException
StreamInbound
onBinaryData
in class StreamInbound
is
- The WebSocket message
IOException
- If a problem occurs processing the message. Any
exception will trigger the closing of the WebSocket
connection.protected final void onTextData(Reader r) throws IOException
StreamInbound
onTextData
in class StreamInbound
r
- The WebSocket message
IOException
- If a problem occurs processing the message. Any
exception will trigger the closing of the WebSocket
connection.public final int getByteBufferMaxSize()
public final void setByteBufferMaxSize(int byteBufferMaxSize)
public final int getCharBufferMaxSize()
public final void setCharBufferMaxSize(int charBufferMaxSize)
protected abstract void onBinaryMessage(ByteBuffer message) throws IOException
message
- The WebSocket message
IOException
- If a problem occurs processing the message. Any
exception will trigger the closing of the WebSocket
connection.protected abstract void onTextMessage(CharBuffer message) throws IOException
message
- The WebSocket message
IOException
- If a problem occurs processing the message. Any
exception will trigger the closing of the WebSocket
connection.
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |