An RMI object representing a connector server. Remote clients
can make connections using the newClient(Object)
method. This
method returns an RMI object representing the connection.
User code does not usually reference this class directly.
RMI connection servers are usually created with the class RMIConnectorServer
. Remote clients usually create connections
either with javax.
or by instantiating RMIConnector
.
This is an abstract class. Concrete subclasses define the details of the client connection objects.
Modifier and Type | Field and Description |
---|---|
private ClassLoader | |
private final List | clientList
List of WeakReference values. |
private static int | |
private RMIConnectorServer | |
private final Map | |
private static final ClassLogger | |
private MBeanServer | |
private NotificationBuffer |
Access | Constructor and Description |
---|---|
public | RMIServerImpl(Map<String, ?>
the environment containing attributes for the new
env)RMIServerImpl . Can be null, which is equivalent
to an empty Map.Constructs a new |
Modifier and Type | Method and Description |
---|---|
protected void | clientClosed(RMIConnection
the client connection that has been closed. client)Method called when a client connection created by |
public synchronized void | |
protected abstract void | closeClient(RMIConnection
a connection previously returned by
client)makeClient on which the closeClient
method has not previously been called. The behavior is
unspecified if these conditions are violated, including the
case where client is null.Closes a client connection made by |
protected abstract void | |
pack-priv RMIConnection | doNewClient(Object credentials)
This method could be overridden by subclasses defined in this package to perform additional operations specific to the underlying transport before creating the new client connection. |
private void | |
protected abstract void | |
public synchronized ClassLoader | Returns: the defaultClassLoader used by this
connector server.Gets the default |
public synchronized MBeanServer | Returns: theMBeanServer to which this connector
is attached.The |
pack-priv synchronized NotificationBuffer | |
protected abstract String | Returns: the protocol string for this object.Returns the protocol string for this object. |
public String | getVersion()
Implements javax. The version of the RMI Connector Protocol understood by this connector server. |
protected abstract RMIConnection | Returns: the newly-createdRMIConnection .the ID of the new connection. Every
connection opened by this connector server will have a
different ID. The behavior is unspecified if this parameter is
null. connectionId, Subject the authenticated subject. Can be null. subject)Creates a new client connection. |
private static synchronized String | |
public RMIConnection | Returns: the newly-createdRMIConnection . This is
usually the object created by makeClient , though
an implementation may choose to wrap that object in another
object implementing RMIConnection .this object specifies the user-defined
credentials to be passed in to the server in order to
authenticate the caller before creating the
credentials)RMIConnection . Can be null.Implements javax. Creates a new client connection. |
public synchronized void | setDefaultClassLoader(ClassLoader
the new cl)ClassLoader to be used by this
connector server.Sets the default |
public synchronized void | setMBeanServer(MBeanServer
the new mbs)MBeanServer . Can be null, but
new client connections will be refused as long as it is.Sets the |
pack-priv void | |
public abstract Remote |
cl | back to summary |
---|---|
private ClassLoader cl |
clientList | back to summary |
---|---|
private final List<WeakReference<RMIConnection>> clientList List of WeakReference values. Each one references an RMIConnection created by this object, or null if the RMIConnection has been garbage-collected. |
connectionIdNumber | back to summary |
---|---|
private static int connectionIdNumber |
connServer | back to summary |
---|---|
private RMIConnectorServer connServer |
env | back to summary |
---|---|
private final Map<String, ?> env |
logger | back to summary |
---|---|
private static final ClassLogger logger |
mbeanServer | back to summary |
---|---|
private MBeanServer mbeanServer |
notifBuffer | back to summary |
---|---|
private NotificationBuffer notifBuffer |
RMIServerImpl | back to summary |
---|---|
public RMIServerImpl(Map<String, ?> env) Constructs a new |
clientClosed | back to summary |
---|---|
protected void clientClosed(RMIConnection client) throws IOException Method called when a client connection created by After removing
|
close | back to summary |
---|---|
public synchronized void close() throws IOException Implements java. Closes this connection server. This method first calls the
The behavior when this method is called more than once is unspecified. If If
|
closeClient | back to summary |
---|---|
protected abstract void closeClient(RMIConnection client) throws IOException Closes a client connection made by
|
closeServer | back to summary |
---|---|
protected abstract void closeServer() throws IOException Called by
|
doNewClient | back to summary |
---|---|
pack-priv RMIConnection doNewClient(Object credentials) throws IOException This method could be overridden by subclasses defined in this package to perform additional operations specific to the underlying transport before creating the new client connection. |
dropDeadReferences | back to summary |
---|---|
private void dropDeadReferences() |
export | back to summary |
---|---|
protected abstract void export() throws IOException Exports this RMI object.
|
getDefaultClassLoader | back to summary |
---|---|
public synchronized ClassLoader getDefaultClassLoader() Gets the default
|
getMBeanServer | back to summary |
---|---|
public synchronized MBeanServer getMBeanServer() The
|
getNotifBuffer | back to summary |
---|---|
pack-priv synchronized NotificationBuffer getNotifBuffer() |
getProtocol | back to summary |
---|---|
protected abstract String getProtocol() Returns the protocol string for this object. The string is
|
getVersion | back to summary |
---|---|
public String getVersion() Implements javax. Doc from javax. The version of the RMI Connector Protocol understood by this connector server. This is a string with the following format: protocol-version implementation-name The After the protocol version there must be a space, followed by the implementation name. The format of the implementation name is unspecified. It is recommended that it include an implementation version number. An implementation can use an empty string as its implementation name, for example for security reasons.
|
makeClient | back to summary |
---|---|
protected abstract RMIConnection makeClient(String connectionId, Subject subject) throws IOException Creates a new client connection. This method is called by
the public method
|
makeConnectionId | back to summary |
---|---|
private static synchronized String makeConnectionId(String protocol, Subject subject) |
newClient | back to summary |
---|---|
public RMIConnection newClient(Object credentials) throws IOException Implements javax. Creates a new client connection. This method calls The fact that a client connection object is in this internal list does not prevent it from being garbage collected.
|
setDefaultClassLoader | back to summary |
---|---|
public synchronized void setDefaultClassLoader(ClassLoader cl) Sets the default
|
setMBeanServer | back to summary |
---|---|
public synchronized void setMBeanServer(MBeanServer mbs) Sets the
|
setRMIConnectorServer | back to summary |
---|---|
pack-priv void setRMIConnectorServer(RMIConnectorServer connServer) throws IOException |
toStub | back to summary |
---|---|
public abstract Remote toStub() throws IOException Returns a remotable stub for this server object.
|