org.apache.mina.examples.sumup
Class ClientSessionHandler

java.lang.Object
  extended by org.apache.mina.protocol.ProtocolHandlerAdapter
      extended by org.apache.mina.examples.sumup.ClientSessionHandler
All Implemented Interfaces:
ProtocolHandler

public class ClientSessionHandler
extends ProtocolHandlerAdapter

ProtocolHandler for SumUp client.

Version:
$Rev: 264677 $, $Date: 2005-08-30 11:44:35 +0900 $
Author:
The Apache Directory Project

Constructor Summary
ClientSessionHandler(int[] values)
           
 
Method Summary
 void exceptionCaught(ProtocolSession session, Throwable cause)
          Invoked when any exception is thrown by user ProtocolHandler implementation or by MINA.
 boolean isFinished()
           
 void messageReceived(ProtocolSession session, Object message)
          Invoked when protocol message is received.
 void sessionCreated(ProtocolSession session)
          Invoked when the session is created.
 void sessionOpened(ProtocolSession session)
          Invoked when the connection is opened.
 
Methods inherited from class org.apache.mina.protocol.ProtocolHandlerAdapter
messageSent, sessionClosed, sessionIdle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientSessionHandler

public ClientSessionHandler(int[] values)
Method Detail

isFinished

public boolean isFinished()

sessionCreated

public void sessionCreated(ProtocolSession session)
Description copied from interface: ProtocolHandler
Invoked when the session is created. Initialize default socket parameters and user-defined attributes here.

Specified by:
sessionCreated in interface ProtocolHandler
Overrides:
sessionCreated in class ProtocolHandlerAdapter

sessionOpened

public void sessionOpened(ProtocolSession session)
Description copied from interface: ProtocolHandler
Invoked when the connection is opened. This method is not invoked if the transport type is UDP.

Specified by:
sessionOpened in interface ProtocolHandler
Overrides:
sessionOpened in class ProtocolHandlerAdapter

messageReceived

public void messageReceived(ProtocolSession session,
                            Object message)
Description copied from interface: ProtocolHandler
Invoked when protocol message is received. Implement your protocol flow here.

Specified by:
messageReceived in interface ProtocolHandler
Overrides:
messageReceived in class ProtocolHandlerAdapter

exceptionCaught

public void exceptionCaught(ProtocolSession session,
                            Throwable cause)
Description copied from interface: ProtocolHandler
Invoked when any exception is thrown by user ProtocolHandler implementation or by MINA. If cause is instanceof IOException, MINA will close the connection automatically.

Specified by:
exceptionCaught in interface ProtocolHandler
Overrides:
exceptionCaught in class ProtocolHandlerAdapter


Copyright © 2004-2005 . All Rights Reserved.