javax.management.remote.message
Class HandshakeEndMessage

java.lang.Object
  extended by javax.management.remote.message.HandshakeEndMessage
All Implemented Interfaces:
Serializable, Message

public class HandshakeEndMessage
extends Object
implements Message

Handshake end message exchanged between the client and the server. From client to server it signals the completion of the profile exchanges. From server to client it signals the acceptance of the negotiated profiles by the server.

When the connection between the client and the server is established the server sends a handshake begin message to the client with all the server's supported profiles. Then, the client selects the profiles it wants to use and starts exchanging messages with the server for the selected profiles. Once the profile exchanges between the client and server are completed the client sends this message to notify the server that the handshake exchanges have been completed. The server replies with its own HandshakeEndMessage to confirm that it is ready to operate with the selected profiles, and to indicate the connection ID it has created; or, if it is not prepared to operate with the selected profiles, it replies with a HandshakeErrorMessage.

If an error is encountered at any time, either on the client or the server side, either peer can send an indication as to why the operation failed.

The context object exchanged between the client and the server is an opaque (serializable) object that is conveyed within this HandshakeEndMessage message.

See Also:
Serialized Form

Constructor Summary
HandshakeEndMessage(Object context, String connectionId)
          Constructs a new HandshakeEndMessage with the opaque context object and connection ID.
 
Method Summary
 String getConnectionId()
          The connection ID.
 Object getContext()
          The context object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandshakeEndMessage

public HandshakeEndMessage(Object context,
                           String connectionId)
Constructs a new HandshakeEndMessage with the opaque context object and connection ID.

Parameters:
context - an opaque serializable object to be sent to the other end of the connection.
connectionId - the ID that the server has assigned to this connection. This parameter is ignored if this is a message from the client to the server.
Method Detail

getContext

public Object getContext()
The context object. The actual implementation of this object is opaque.

Returns:
The opaque context object.

getConnectionId

public String getConnectionId()
The connection ID.

Returns:
The connection ID.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.