org.apache.mina.examples.netcat
Class NetCatProtocolHandler

java.lang.Object
  extended by org.apache.mina.io.IoHandlerAdapter
      extended by org.apache.mina.examples.netcat.NetCatProtocolHandler
All Implemented Interfaces:
IoHandler

public class NetCatProtocolHandler
extends IoHandlerAdapter

IoHandler implementation for NetCat client. This class extended IoHandlerAdapter for convenience.

Version:
$Rev: 264677 $, $Date: 2005-08-30 11:44:35 +0900 $,
Author:
Trustin Lee (trustin@apache.org)

Constructor Summary
NetCatProtocolHandler()
           
 
Method Summary
 void dataRead(IoSession session, ByteBuffer buf)
          Invoked when data is read from the connection.
 void sessionClosed(IoSession session)
          Invoked when the connection is closed.
 void sessionIdle(IoSession session, IdleStatus status)
          Invoked when the connection is idle.
 void sessionOpened(IoSession session)
          Invoked when the connection is opened.
 
Methods inherited from class org.apache.mina.io.IoHandlerAdapter
dataWritten, exceptionCaught, sessionCreated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetCatProtocolHandler

public NetCatProtocolHandler()
Method Detail

sessionOpened

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

Specified by:
sessionOpened in interface IoHandler
Overrides:
sessionOpened in class IoHandlerAdapter

sessionClosed

public void sessionClosed(IoSession session)
Description copied from interface: IoHandler
Invoked when the connection is closed. This method is not invoked if the transport type is UDP.

Specified by:
sessionClosed in interface IoHandler
Overrides:
sessionClosed in class IoHandlerAdapter

sessionIdle

public void sessionIdle(IoSession session,
                        IdleStatus status)
Description copied from interface: IoHandler
Invoked when the connection is idle. Refer to IdleStatus. This method is not invoked if the transport type is UDP.

Specified by:
sessionIdle in interface IoHandler
Overrides:
sessionIdle in class IoHandlerAdapter

dataRead

public void dataRead(IoSession session,
                     ByteBuffer buf)
Description copied from interface: IoHandler
Invoked when data is read from the connection. You can access buf to get read data. buf returns to the internal buffer pool of MINA after this method is invoked, so please don't try to reuse it.

Specified by:
dataRead in interface IoHandler
Overrides:
dataRead in class IoHandlerAdapter


Copyright © 2004-2005 . All Rights Reserved.