java.rmi.transport
Interface SecureServerConnection


public interface SecureServerConnection

Defines a transport-neutral interface to established server-side connections for secure remote calls. In the case of TCP, a connection is usually a wrapper around an instance of (or an instance of a subclass of) java.net.Socket.

Since:
1.4

Method Summary
 void close()
          Closes the connection.
 java.io.InputStream getInputStream()
          Returns an input stream for the connection.
 java.io.OutputStream getOutputStream()
          Returns an output stream for the connection.
 javax.security.auth.Subject readCallDataAndCheckConstraints(java.io.ObjectInputStream stream, SecurityConstraints constraints)
          Reads from the specified stream any per-call data required by the connection for a remote call, verifies that the constraints actually in use on the connection, in conjunction with the authenticated identity of the client (if any) and server (if any), satisfy the specified requirements (preferences are ignored), and returns the authenticated identity of the client as a read-only instance, or null if the client has not been authenticated.
 

Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an input stream for the connection.
Returns:
an input stream for the connection

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns an output stream for the connection.
Returns:
an output stream for the connection

readCallDataAndCheckConstraints

public javax.security.auth.Subject readCallDataAndCheckConstraints(java.io.ObjectInputStream stream,
                                                                   SecurityConstraints constraints)
                                                            throws java.io.IOException
Reads from the specified stream any per-call data required by the connection for a remote call, verifies that the constraints actually in use on the connection, in conjunction with the authenticated identity of the client (if any) and server (if any), satisfy the specified requirements (preferences are ignored), and returns the authenticated identity of the client as a read-only instance, or null if the client has not been authenticated. This method typically reads nothing unless this connection supports delegation, in which case this method might read information about whether delegation is in force for this call and (if it is) any associated delegation credentials and/or constraints. Note that constraints passed to this method may include constraints based on relative time.

There can be multiple remote calls taking place concurrently over this connection, and the specified stream may be buffering and multiplexing the data from different calls out of this connection's underlying input stream. As such, this method can only read data from the specified stream, and cannot write any data to the connection's underlying output stream. If this connection's underlying protocol conflicts with these requirements, then the connection should implement SecureReusableClientConnection and perform any necessary data transfer in the switchConstraints method of that interface instead.

Parameters:
stream - the input stream
constraints - the requirements that must be satisfied (preferences are ignored)
Returns:
the authenticated identity of the client as a read-only instance, or null if the client has not been authenticated
Throws:
NullPointerException - if any parameter is null
java.lang.SecurityException - if the constraints actually in use on the connection, in conjunction with the authenticated identity of the client (if any) and server (if any), do not satisfy the specified requirements
java.io.IOException - if an I/O exception occurs

close

public void close()
           throws java.io.IOException
Closes the connection.


Copyright © 2000 Sun Microsystems, Inc. All rights reserved