java.rmi.transport
Interface SecureReusableClientConnection

All Superinterfaces:
SecureClientConnection

public interface SecureReusableClientConnection
extends SecureClientConnection

Defines the interface for secure client connections capable of being reused with different constraints or client subjects.

Since:
1.4

Method Summary
 boolean canSwitchConstraints(SecureCallContext context)
          Returns true if this connection supports switching the state of the connection such that the connection would satisfy at least the same constraints that would be satisfied if openConnection was invoked on the same endpoint (that was used to open this connection) with the specified context; returns false otherwise.
 void switchConstraints(SecureCallContext context)
          Switches the state of the connection, such that the connection satisfies at least the same constraints that would be satisfied if openConnection was invoked on the same endpoint (that was used to open this connection) with the specified context.
 
Methods inherited from interface java.rmi.transport.SecureClientConnection
close, getInputStream, getOutputStream, getServerSubject, writeCallData
 

Method Detail

canSwitchConstraints

public boolean canSwitchConstraints(SecureCallContext context)
Returns true if this connection supports switching the state of the connection such that the connection would satisfy at least the same constraints that would be satisfied if openConnection was invoked on the same endpoint (that was used to open this connection) with the specified context; returns false otherwise. This method is not permitted to communicate with the remote server.
Parameters:
context - the secure call context
Returns:
true if this connection supports switching the state of the connection such that the connection would satisfy at least the same constraints that would be satisfied if openConnection was invoked on the same endpoint (that was used to open this connection) with the specified context; false otherwise
Throws:
NullPointerException - if context is null
java.lang.IllegalArgumentException - if the specified context was not created by an endpoint equal to the endpoint used to open this connection

switchConstraints

public void switchConstraints(SecureCallContext context)
                       throws java.io.IOException
Switches the state of the connection, such that the connection satisfies at least the same constraints that would be satisfied if openConnection was invoked on the same endpoint (that was used to open this connection) with the specified context.

The connection implementation can assume that no remote method calls will be in progress when this method is called, that no remote method calls will be initiated until after this method returns, and that no other concurrent calls to this method will be made. However, other higher-level protocol data may be sent (in both directions) while this method is executing, and any such data must be transmitted to avoid a deadlock.

Parameters:
context - the secure call context
Throws:
java.io.IOException - if an I/O exception occurs
NullPointerException - if context is null
java.lang.IllegalArgumentException - if the specified context was not created by an endpoint equal to the endpoint used to open this connection, or canSwitchConstraints would return false for the specified context


Copyright © 2000 Sun Microsystems, Inc. All rights reserved