com.caucho.message.tourmaline
Class NautilusServerEndpoint

java.lang.Object
  extended by com.caucho.websocket.AbstractWebSocketListener
      extended by com.caucho.message.tourmaline.NautilusServerEndpoint
All Implemented Interfaces:
WebSocketListener

public class NautilusServerEndpoint
extends AbstractWebSocketListener

Custom serialization for the cache


Method Summary
 void close()
           
protected  void onClose()
           
 void onClose(WebSocketContext context)
          Called when the peer closes the connection gracefully.
protected  void onFlow(int credit, long sequence)
           
 void onReadBinary(WebSocketContext context, java.io.InputStream is)
          Called when a binary message is available
protected  void onSend(java.io.InputStream is)
           
 void onStart(WebSocketContext context)
          Called when the connection is established
protected  void publishStart(java.io.InputStream is)
           
protected  int readInt(java.io.InputStream is)
           
protected  long readLong(java.io.InputStream is)
           
protected  void receiveStart(java.io.InputStream is)
           
 java.lang.String toString()
           
protected  void write(java.io.OutputStream os, java.lang.String msg)
           
protected  void writeInt(java.io.OutputStream os, int value)
           
protected  void writeLong(java.io.OutputStream os, long value)
           
 
Methods inherited from class com.caucho.websocket.AbstractWebSocketListener
onDisconnect, onReadText, onTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

publishStart

protected void publishStart(java.io.InputStream is)
                     throws java.io.IOException
Throws:
java.io.IOException

receiveStart

protected void receiveStart(java.io.InputStream is)
                     throws java.io.IOException
Throws:
java.io.IOException

onSend

protected void onSend(java.io.InputStream is)
               throws java.io.IOException
Throws:
java.io.IOException

onFlow

protected void onFlow(int credit,
                      long sequence)

onClose

protected void onClose()

onStart

public void onStart(WebSocketContext context)
             throws java.io.IOException
Description copied from class: AbstractWebSocketListener
Called when the connection is established

Specified by:
onStart in interface WebSocketListener
Overrides:
onStart in class AbstractWebSocketListener
Throws:
java.io.IOException

onReadBinary

public void onReadBinary(WebSocketContext context,
                         java.io.InputStream is)
                  throws java.io.IOException
Description copied from class: AbstractWebSocketListener
Called when a binary message is available

Specified by:
onReadBinary in interface WebSocketListener
Overrides:
onReadBinary in class AbstractWebSocketListener
Throws:
java.io.IOException

onClose

public void onClose(WebSocketContext context)
             throws java.io.IOException
Description copied from class: AbstractWebSocketListener
Called when the peer closes the connection gracefully.

Specified by:
onClose in interface WebSocketListener
Overrides:
onClose in class AbstractWebSocketListener
Throws:
java.io.IOException

readInt

protected final int readInt(java.io.InputStream is)
                     throws java.io.IOException
Throws:
java.io.IOException

readLong

protected final long readLong(java.io.InputStream is)
                       throws java.io.IOException
Throws:
java.io.IOException

writeInt

protected void writeInt(java.io.OutputStream os,
                        int value)
                 throws java.io.IOException
Throws:
java.io.IOException

writeLong

protected void writeLong(java.io.OutputStream os,
                         long value)
                  throws java.io.IOException
Throws:
java.io.IOException

write

protected void write(java.io.OutputStream os,
                     java.lang.String msg)
              throws java.io.IOException
Throws:
java.io.IOException

close

public void close()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object