public static final class MCPLoopbackSocketTransport.Connection

  1. Object
  2. SocketConnection
  3. 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

errorCode int
the error code
message String
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

is InputStream
input stream for the socket
os OutputStream
output stream for the socket