org.crsh.util
Class AbstractSocketClient

java.lang.Object
  extended by org.crsh.util.AbstractSocketClient
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
RemoteClient

public abstract class AbstractSocketClient
extends Object
implements Closeable


Field Summary
private  InputStream in
          .
private  OutputStream out
          .
private  int port
          .
private  Socket socket
          .
 
Constructor Summary
AbstractSocketClient(int port)
           
 
Method Summary
 void close()
           
 void connect()
           
protected abstract  void handle(InputStream in, OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

port

private int port
.


socket

private Socket socket
.


in

private InputStream in
.


out

private OutputStream out
.

Constructor Detail

AbstractSocketClient

public AbstractSocketClient(int port)
Method Detail

connect

public final void connect()
                   throws IOException
Throws:
IOException

handle

protected abstract void handle(InputStream in,
                               OutputStream out)
                        throws IOException
Throws:
IOException

close

public final void close()
Specified by:
close in interface Closeable


Copyright © 2014 eXo Platform SAS. All Rights Reserved.