javax.management.remote.message
Class HandshakeBeginMessage

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

public class HandshakeBeginMessage
extends Object
implements Message

Handshake begin message exchanged between the server and the client.

First of all, when the connection between the client and the server is established the server sends this message to the client with all the server's supported profiles and the server version of the JMXMP protocol.

The first thing the client does is to compare the version of the JMXMP protocol supported by the server against the version supported by the client. As a result of this comparison the following things can happen:

Once the JMXMP protocol versions to use have been negotiated, the client and the server start the profile negotiation phase. The server's supported profiles are configured by specifying the jmx.remote.profiles property in the environment map passed into the JMXConnectorServer. Upon reception of the HandshakeBeginMessage the client verifies that the profiles it wants to use, namely the ones specified through the jmx.remote.profiles property in the environment map passed into the JMXConnector are all present in the server's supported profile list. If false, the client sends a HandshakeErrorMessage to the server and closes the connection. Otherwise, the client starts exchanging profile messages with the server for the selected profiles following the order specified in the client's profile list. Once the profile exchanges between the client and the server are completed the client sends a HandshakeEndMessage to notify the server that the handshake exchanges have been successfully completed with regards to the client. Then the server verifies that the negotiated profiles do not compromise the server's minimum required security level and if the server agrees it sends a HandshakeEndMessage to notify the client that the handshake exchanges have been successfully completed with regards to the server. If the server does not agree on the negotiated profiles it sends a HandshakeErrorMessage to the client and closes the connection.

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

The server's supported profiles contained in this message are formatted as a space-separated list.

The server's JMXMP protocol version describes the version of the JMXMP protocol supported by the server.

See Also:
Serialized Form

Constructor Summary
HandshakeBeginMessage(String profiles, String version)
          Constructs a new HandshakeBeginMessage with the space-separated list of server's supported profile names and the server version of the JMXMP protocol.
 
Method Summary
 String getProfiles()
          A space-separated list containing the server's supported profile names.
 String getVersion()
          The version of the JMXMP protocol supported by the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandshakeBeginMessage

public HandshakeBeginMessage(String profiles,
                             String version)
Constructs a new HandshakeBeginMessage with the space-separated list of server's supported profile names and the server version of the JMXMP protocol.

Parameters:
profiles - a space-separated list of the server's supported profile names.
version - the server's version of the JMXMP protocol.
Method Detail

getProfiles

public String getProfiles()
A space-separated list containing the server's supported profile names.

Returns:
The space-separated list of the server's supported profile names.

getVersion

public String getVersion()
The version of the JMXMP protocol supported by the server.

Returns:
The server version of the JMXMP protocol.

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.