|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.replication.protocol.ReplicationMessage
org.opends.server.replication.protocol.StartMessage
public abstract class StartMessage
This abstract message class is the superclass for start messages used by LDAP servers and Replication servers to initiate their communications. This class specifies a message header that contains the Replication Protocol version.
Field Summary | |
---|---|
protected int |
headerLength
The length of the header of this message. |
Constructor Summary | |
---|---|
StartMessage(byte type,
byte[] encodedMsg)
Creates a new ServerStartMessage from its encoded form. |
|
StartMessage(short protocolVersion,
long generationId)
Create a new StartMessage. |
Method Summary | |
---|---|
int |
decodeHeader(byte type,
byte[] encodedMsg)
Decode the Header part of this message, and check its type. |
byte[] |
encodeHeader(byte type,
int additionalLength)
Encode the header for the start message. |
long |
getGenerationId()
Get the generationId from this message. |
short |
getVersion()
Get the version included in the Start Message mean the replication protocol version used by the server that created the message. |
Methods inherited from class org.opends.server.replication.protocol.ReplicationMessage |
---|
addByteArray, generateMsg, getBytes, getNextLength |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int headerLength
Constructor Detail |
---|
public StartMessage(short protocolVersion, long generationId)
protocolVersion
- The Replication Protocol version of the server
for which the StartMessage is created.generationId
- The generationId for this server.public StartMessage(byte type, byte[] encodedMsg) throws java.util.zip.DataFormatException
type
- The type of the message to create.encodedMsg
- The byte array containing the encoded form of the
StartMessage.
java.util.zip.DataFormatException
- If the byte array does not contain a valid
encoded form of the ServerStartMessage.Method Detail |
---|
public byte[] encodeHeader(byte type, int additionalLength) throws java.io.UnsupportedEncodingException
type
- The type of the message to create.additionalLength
- additional length needed to encode the remaining
part of the UpdateMessage.
java.io.UnsupportedEncodingException
- if UTF-8 is not supported.public int decodeHeader(byte type, byte[] encodedMsg) throws java.util.zip.DataFormatException
type
- The type of this message.encodedMsg
- the encoded form of the message.
java.util.zip.DataFormatException
- if the encodedMsg does not contain a valid
common header.public short getVersion()
public long getGenerationId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |