org.apache.mina.example.imagine.step1.client
Class ImageClient

java.lang.Object
  extended by org.apache.mina.core.service.IoHandlerAdapter
      extended by org.apache.mina.example.imagine.step1.client.ImageClient
All Implemented Interfaces:
IoHandler

public class ImageClient
extends IoHandlerAdapter

client for the ImageServer

Author:
Apache MINA Project

Field Summary
static int CONNECT_TIMEOUT
           
 
Constructor Summary
ImageClient(java.lang.String host, int port, ImageListener imageListener)
           
 
Method Summary
 void connect()
           
 void disconnect()
           
 void exceptionCaught(IoSession session, java.lang.Throwable cause)
           
 boolean isConnected()
           
 void messageReceived(IoSession session, java.lang.Object message)
           
 void sendRequest(ImageRequest imageRequest)
           
 void sessionClosed(IoSession session)
           
 void sessionOpened(IoSession session)
           
 
Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter
messageSent, sessionCreated, sessionIdle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECT_TIMEOUT

public static final int CONNECT_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

ImageClient

public ImageClient(java.lang.String host,
                   int port,
                   ImageListener imageListener)
Method Detail

isConnected

public boolean isConnected()

connect

public void connect()

disconnect

public void disconnect()

sessionOpened

public void sessionOpened(IoSession session)
                   throws java.lang.Exception
Specified by:
sessionOpened in interface IoHandler
Overrides:
sessionOpened in class IoHandlerAdapter
Throws:
java.lang.Exception

sessionClosed

public void sessionClosed(IoSession session)
                   throws java.lang.Exception
Specified by:
sessionClosed in interface IoHandler
Overrides:
sessionClosed in class IoHandlerAdapter
Throws:
java.lang.Exception

sendRequest

public void sendRequest(ImageRequest imageRequest)

messageReceived

public void messageReceived(IoSession session,
                            java.lang.Object message)
                     throws java.lang.Exception
Specified by:
messageReceived in interface IoHandler
Overrides:
messageReceived in class IoHandlerAdapter
Throws:
java.lang.Exception

exceptionCaught

public void exceptionCaught(IoSession session,
                            java.lang.Throwable cause)
                     throws java.lang.Exception
Specified by:
exceptionCaught in interface IoHandler
Overrides:
exceptionCaught in class IoHandlerAdapter
Throws:
java.lang.Exception


Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.