org.opends.server.replication.protocol
Class EntryMessage

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

public class EntryMessage
extends RoutableMessage
implements java.io.Serializable

This message is part of the replication protocol. This message is sent by a server to one or several other servers and contain one entry to be sent over the protocol in the context of an import/export over the protocol.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opends.server.replication.protocol.RoutableMessage
ALL_SERVERS, destination, senderID, THE_CLOSEST_SERVER, UNKNOWN_SERVER
 
Constructor Summary
EntryMessage(byte[] in)
          Creates a new EntryMessage from its encoded form.
EntryMessage(short sender, short destination, byte[] entryBytes)
          Creates a new EntryMessage.
 
Method Summary
 byte[] getBytes()
          Return the byte[] representation of this message.
 byte[] getEntryBytes()
          Returns the entry bytes.
 
Methods inherited from class org.opends.server.replication.protocol.RoutableMessage
getDestination, getsenderID, toString
 
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, wait, wait, wait
 

Constructor Detail

EntryMessage

public EntryMessage(short sender,
                    short destination,
                    byte[] entryBytes)
Creates a new EntryMessage.

Parameters:
sender - The sender of this message.
destination - The destination of this message.
entryBytes - The bytes of the entry.

EntryMessage

public EntryMessage(byte[] in)
             throws java.util.zip.DataFormatException
Creates a new EntryMessage from its encoded form.

Parameters:
in - The byte array containing the encoded form of the message.
Throws:
java.util.zip.DataFormatException - If the byte array does not contain a valid encoded form of the ServerStartMessage.
Method Detail

getEntryBytes

public byte[] getEntryBytes()
Returns the entry bytes.

Returns:
The entry bytes.

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.