java.rmi.transport
Interface SecureServerEndpoint


public interface SecureServerEndpoint

Defines a transport-neutral interface to objects that contain all of the information necessary for a server to start listening for incoming connections for secure remote calls. In the case of TCP, a server endpoint normally contains a local IP address and port to bind to (usually defaulting to address 0.0.0.0 and port zero), the subject to use for server authentication, and the socket factory to use.

The equals method returns true if the parameter is a functionally equivalent SecureServerEndpoint instance, and returns false otherwise. To avoid opening a security hole, the implementation of the equals method should only compare object identity (==) of subjects, rather than comparing the contents of subjects.

Since:
1.4

Method Summary
 void checkListen()
          Checks if the calling thread has permission to call listen.
 SecureConnectionAcceptor listen()
          Returns a new connection acceptor that listens for incoming connections.
 boolean supportsConstraints(SecurityConstraints constraints)
          Returns true if this endpoint can support the specified server requirements (any preferences are ignored) and the calling thread has the requisite permissions (such as AuthenticationPermission) to satisfy the requirements; returns false otherwise.
 

Method Detail

supportsConstraints

public boolean supportsConstraints(SecurityConstraints constraints)
Returns true if this endpoint can support the specified server requirements (any preferences are ignored) and the calling thread has the requisite permissions (such as AuthenticationPermission) to satisfy the requirements; returns false otherwise. Note that constraints passed to this method may include constraints based on relative time.
Parameters:
constraints - the server requirements (any preferences are ignored)
Returns:
true if this endpoint can support the specified server requirements and the calling thread has the requisite permissions to satisfy the requirements; false otherwise
Throws:
NullPointerException - if the constraints parameter is null

listen

public SecureConnectionAcceptor listen()
                                throws java.io.IOException
Returns a new connection acceptor that listens for incoming connections.
Returns:
a new connection acceptor that listens for incoming connections
Throws:
java.io.IOException - if an I/O exception occurs
java.lang.SecurityException - if the calling thread does not have permission to call this method. In the usual TCP/IP case, the permission check is performed by calling the checkListen method of the installed security manager, passing the port that will be used to listen for incoming connections

checkListen

public void checkListen()
Checks if the calling thread has permission to call listen.
Throws:
java.lang.SecurityException - if the calling thread does not have permission to call listen. In the usual TCP/IP case, the permission check is performed by calling the checkListen method of the installed security manager, passing the port that will be used to listen for incoming connections.


Copyright © 2000 Sun Microsystems, Inc. All rights reserved