public class

ManagedSocket

extends Object
implements NioEndpoint
java.lang.Object
   ↳ com.ericsson.research.transport.ManagedSocket
Known Direct Subclasses

Summary

Nested Classes
enum ManagedSocket.State  
Public Constructors
ManagedSocket()
Protected Constructors
ManagedSocket(boolean connected)
Public Methods
boolean canAccept()
void connect(InetSocketAddress address)
void connect(String host, int port)
static byte[] copy(byte[] data, int size)
NioEndpoint createAcceptChild()
Create a child that can be used for accepting.
void disconnect()
InetSocketAddress getInetAddress()
SelectionKey getKey()
InetSocketAddress getLocalSocketAddress()
InetSocketAddress getRemoteSocketAddress()
ManagedSocket.State getState()
void notifyAccepted(NioEndpoint endpoint)
void notifyClosed()
void notifyConnected()
void notifyError(Exception e)
void receive(byte[] data, int size)
void registerClient(ManagedSocketClient client)
void setNioManager(NioManager nioManager, SelectionKey key)
void write(byte[] data)
void write(byte[] data, int size)
Protected Methods
void finalize()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ericsson.research.transport.NioEndpoint

Public Constructors

public ManagedSocket ()

Protected Constructors

protected ManagedSocket (boolean connected)

Public Methods

public boolean canAccept ()

public void connect (InetSocketAddress address)

public void connect (String host, int port)

public static byte[] copy (byte[] data, int size)

public NioEndpoint createAcceptChild ()

Create a child that can be used for accepting.

Returns
  • A newly created NioEndpoint object capable of processing replies from this NioManager

public void disconnect ()

public InetSocketAddress getInetAddress ()

public SelectionKey getKey ()

public InetSocketAddress getLocalSocketAddress ()

public InetSocketAddress getRemoteSocketAddress ()

public ManagedSocket.State getState ()

public void notifyAccepted (NioEndpoint endpoint)

public void notifyClosed ()

public void notifyConnected ()

public void notifyError (Exception e)

public void receive (byte[] data, int size)

public void registerClient (ManagedSocketClient client)

public void setNioManager (NioManager nioManager, SelectionKey key)

public void write (byte[] data)

Throws
IOException

public void write (byte[] data, int size)

Throws
IOException

Protected Methods

protected void finalize ()

Throws
Throwable