org.crsh.term.spi.net
Class TermIOServer

java.lang.Object
  extended by org.crsh.term.spi.net.TermIOServer

public class TermIOServer
extends Object

Author:
Julien Viet

Field Summary
private  int bindingPort
          .
private  TermIO delegate
          .
private  InputStream in
          .
private  OutputStream out
          .
private  int port
          .
private  Socket socket
          .
private  ServerSocket socketServer
          .
private static Charset UTF_8
          .
 
Constructor Summary
TermIOServer(TermIO delegate, int bindingPort)
           
 
Method Summary
 void accept()
           
 int bind()
           
 boolean execute()
           
private  void flush()
           
 int getBindingPort()
           
 int getPort()
           
private  void iterate()
           
private  byte read()
           
private  int read(byte[] buffer, int off, int len)
           
private  void write(byte b)
           
private  void write(byte[] bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTF_8

private static final Charset UTF_8
.


delegate

private final TermIO delegate
.


bindingPort

private final int bindingPort
.


socketServer

private ServerSocket socketServer
.


socket

private Socket socket
.


in

private InputStream in
.


out

private OutputStream out
.


port

private int port
.

Constructor Detail

TermIOServer

public TermIOServer(TermIO delegate,
                    int bindingPort)
Method Detail

getBindingPort

public int getBindingPort()

getPort

public int getPort()

bind

public int bind()
         throws IOException
Throws:
IOException

accept

public void accept()
            throws IOException
Throws:
IOException

read

private byte read()
           throws IOException,
                  Done
Throws:
IOException
Done

read

private int read(byte[] buffer,
                 int off,
                 int len)
          throws IOException,
                 Done
Throws:
IOException
Done

write

private void write(byte b)
            throws IOException,
                   Done
Throws:
IOException
Done

write

private void write(byte[] bytes)
            throws IOException,
                   Done
Throws:
IOException
Done

flush

private void flush()
            throws IOException,
                   Done
Throws:
IOException
Done

execute

public boolean execute()
                throws IOException,
                       IllegalStateException
Throws:
IOException
IllegalStateException

iterate

private void iterate()
              throws IOException,
                     Done
Throws:
IOException
Done


Copyright © 2012 eXo Platform SAS. All Rights Reserved.