public static final class MCPLoopbackSocketTransport.Connection
- Object
- SocketConnection
- MCPLoopbackSocketTransport.Connection
The per-connection callback the socket API instantiates. Public with a no-argument
constructor because
Socket.listenLoopback creates it reflectively.Constructors
public Connection() | Public and no-argument because Socket.listenLoopback constructs this reflectively; the binding above is what the constructor exists for. |
Methods
public void connectionError(int errorCode, String message) | Invoked in case of an error in the socket connection, this method is invoked off the EDT |
public void connectionEstablished(InputStream is, OutputStream os) | Invoked when a socket connection is established, this method is invoked off the EDT |
Inherited methods
Constructor details
Connection
public Connection()Public and no-argument because
Socket.listenLoopback constructs this
reflectively; the binding above is what the constructor exists for.Method details
connectionError
public void connectionError(int errorCode, String message)Invoked in case of an error in the socket connection, this method is invoked off the EDT
Parameters
errorCodeint- the error code
messageString- error message if applicable
connectionEstablished
public void connectionEstablished(InputStream is, OutputStream os)Invoked when a socket connection is established, this method is invoked off the EDT
Parameters
isInputStream- input stream for the socket
osOutputStream- output stream for the socket