| File was renamed from opendj-sdk/opends/src/server/org/opends/server/replication/protocol/SynchronizationMessage.java |
| | |
| | | |
| | | /** |
| | | * Abstract class that must be used when defining messages that can |
| | | * be sent for synchronization purpose between servers. |
| | | * be sent for replication purpose between servers. |
| | | * |
| | | * When extending this class one should also create a new MSG_TYPE |
| | | * and should update the generateMsg() method. |
| | | */ |
| | | public abstract class SynchronizationMessage |
| | | public abstract class ReplicationMessage |
| | | { |
| | | static final byte MSG_TYPE_MODIFY_REQUEST = 1; |
| | | static final byte MSG_TYPE_ADD_REQUEST = 2; |
| | |
| | | |
| | | |
| | | /** |
| | | * Generates a SynchronizationMessage from its encoded form. |
| | | * Generates a ReplicationMessage from its encoded form. |
| | | * |
| | | * @param buffer The encode form of the SynchronizationMessage. |
| | | * @param buffer The encode form of the ReplicationMessage. |
| | | * @return the generated SycnhronizationMessage. |
| | | * @throws DataFormatException if the encoded form was not a valid msg. |
| | | * @throws UnsupportedEncodingException if UTF8 is not supported. |
| | | */ |
| | | public static SynchronizationMessage generateMsg(byte[] buffer) |
| | | public static ReplicationMessage generateMsg(byte[] buffer) |
| | | throws DataFormatException, UnsupportedEncodingException |
| | | { |
| | | SynchronizationMessage msg = null; |
| | | ReplicationMessage msg = null; |
| | | switch (buffer[0]) |
| | | { |
| | | case MSG_TYPE_MODIFY_REQUEST: |