public class

TCPTransport

extends Transport
java.lang.Object
   ↳ sun.rmi.transport.Transport
     ↳ sun.rmi.transport.tcp.TCPTransport

Class Overview

TCPTransport is the socket-based implementation of the RMI Transport abstraction.

Summary

Public Methods
void exportObject(Target target)
Export the object so that it can accept incoming calls.
void free(Endpoint ep)
Removes the Channel that generates connections to the endpoint ep.
TCPChannel getChannel(Endpoint ep)
Returns a Channel that generates connections to the endpoint ep.
static String getClientHost()
Returns the client host for the current thread's connection.
void shedConnectionCaches()
Closes all cached connections in every channel subordinated to this transport.
Protected Methods
void checkAcceptPermission(AccessControlContext acc)
Verify that the current access control context has permission to accept the connection being dispatched by the current thread.
synchronized void targetUnexported()
Invoked when an object that was exported on this transport has become unexported, either by being garbage collected or by being explicitly unexported.
[Expand]
Inherited Methods
From class sun.rmi.transport.Transport
From class java.lang.Object

Public Methods

public void exportObject (Target target)

Export the object so that it can accept incoming calls.

public void free (Endpoint ep)

Removes the Channel that generates connections to the endpoint ep.

public TCPChannel getChannel (Endpoint ep)

Returns a Channel that generates connections to the endpoint ep. A Channel is an object that creates and manages connections of a particular type to some particular address space.

Parameters
ep the endpoint to which connections will be generated.
Returns
  • the channel or null if the transport cannot generate connections to this endpoint

public static String getClientHost ()

Returns the client host for the current thread's connection. Throws ServerNotActiveException if no connection is active for this thread.

public void shedConnectionCaches ()

Closes all cached connections in every channel subordinated to this transport. Currently, this only closes outgoing connections.

Protected Methods

protected void checkAcceptPermission (AccessControlContext acc)

Verify that the current access control context has permission to accept the connection being dispatched by the current thread.

protected synchronized void targetUnexported ()

Invoked when an object that was exported on this transport has become unexported, either by being garbage collected or by being explicitly unexported.