org.opends.server.replication.protocol
Class ReplServerStartMessage

java.lang.Object
  extended by org.opends.server.replication.protocol.ReplicationMessage
      extended by org.opends.server.replication.protocol.StartMessage
          extended by org.opends.server.replication.protocol.ReplServerStartMessage
All Implemented Interfaces:
java.io.Serializable

public class ReplServerStartMessage
extends StartMessage
implements java.io.Serializable

Message sent by a replication server to another replication server at Startup.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opends.server.replication.protocol.StartMessage
headerLength
 
Constructor Summary
ReplServerStartMessage(byte[] in)
          Creates a new ReplServerStartMessage by decoding the provided byte array.
ReplServerStartMessage(short serverId, java.lang.String serverURL, DN baseDn, int windowSize, ServerState serverState, short protocolVersion, long generationId, boolean sslEncryption)
          Create a ReplServerStartMessage.
 
Method Summary
 DN getBaseDn()
          Get the base DN from this ReplServerStartMessage.
 byte[] getBytes()
          Return the byte[] representation of this message.
 short getServerId()
          Get the Server Id.
 ServerState getServerState()
          Get the serverState.
 java.lang.String getServerURL()
          Set the server URL.
 boolean getSSLEncryption()
          Get the SSL encryption value for the server that created the message.
 int getWindowSize()
          get the window size for the server that created this message.
 
Methods inherited from class org.opends.server.replication.protocol.StartMessage
decodeHeader, encodeHeader, getGenerationId, getVersion
 
Methods inherited from class org.opends.server.replication.protocol.ReplicationMessage
addByteArray, generateMsg, getNextLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplServerStartMessage

public ReplServerStartMessage(short serverId,
                              java.lang.String serverURL,
                              DN baseDn,
                              int windowSize,
                              ServerState serverState,
                              short protocolVersion,
                              long generationId,
                              boolean sslEncryption)
Create a ReplServerStartMessage.

Parameters:
serverId - replication server id
serverURL - replication server URL
baseDn - base DN for which the ReplServerStartMessage is created.
windowSize - The window size.
serverState - our ServerState for this baseDn.
protocolVersion - The replication protocol version of the creator.
generationId - The generationId for this server.
sslEncryption - Whether to continue using SSL to encrypt messages after the start messages have been exchanged.

ReplServerStartMessage

public ReplServerStartMessage(byte[] in)
                       throws java.util.zip.DataFormatException
Creates a new ReplServerStartMessage by decoding the provided byte array.

Parameters:
in - A byte array containing the encoded information for the ReplServerStartMessage
Throws:
java.util.zip.DataFormatException - If the in does not contain a properly encoded ReplServerStartMessage.
Method Detail

getServerId

public short getServerId()
Get the Server Id.

Returns:
the server id

getServerURL

public java.lang.String getServerURL()
Set the server URL.

Returns:
the server URL

getBaseDn

public DN getBaseDn()
Get the base DN from this ReplServerStartMessage.

Returns:
the base DN from this ReplServerStartMessage.

getServerState

public ServerState getServerState()
Get the serverState.

Returns:
Returns the serverState.

getBytes

public byte[] getBytes()
Return the byte[] representation of this message. Depending on the message type, the first byte of the byte[] must be. MSG_TYPE_MODIFY_REQUEST MSG_TYPE_ADD_REQUEST MSG_TYPE_DELETE_REQUEST MSG_TYPE_MODIFY_DN_REQUEST MSG_TYPE_ACK MSG_TYPE_SERVER_START MSG_TYPE_REPL_SERVER_START MSG_TYPE_WINDOW MSG_TYPE_HEARTBEAT MSG_TYPE_INITIALIZE MSG_TYPE_INITIALIZE_TARGET MSG_TYPE_ENTRY MSG_TYPE_DONE MSG_TYPE_ERROR MSG_TYPE_WINDOW_PROBE MSG_TYPE_REPL_SERVER_INFO MSG_TYPE_RESET_GENERATION_ID MSG_TYPE_REPL_SERVER_MONITOR_REQUEST MSG_TYPE_REPL_SERVER_MONITOR

Specified by:
getBytes in class ReplicationMessage
Returns:
the byte[] representation of this message.

getWindowSize

public int getWindowSize()
get the window size for the server that created this message.

Returns:
The window size for the server that created this message.

getSSLEncryption

public boolean getSSLEncryption()
Get the SSL encryption value for the server that created the message.

Returns:
The SSL encryption value for the server that created the message.