| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2013-2014 ForgeRock AS. |
| | | * Portions copyright 2013-2016 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | */ |
| | | public class MonitorRequestMsg extends ReplicationMsg |
| | | { |
| | | /** |
| | | * The destination server or servers of this message. |
| | | */ |
| | | /** The destination server or servers of this message. */ |
| | | private final int destination; |
| | | |
| | | /** |
| | | * The serverID of the server that sends this message. |
| | | */ |
| | | /** The serverID of the server that sends this message. */ |
| | | private final int senderID; |
| | | |
| | | /** |
| | |
| | | this.destination = destination; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new message by decoding the provided byte array. |
| | | * |
| | |
| | | this.destination = scanner.nextIntUTF8(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public byte[] getBytes(short protocolVersion) |
| | | { |
| | |
| | | return senderID; |
| | | } |
| | | |
| | | /** |
| | | * Returns a string representation of the message. |
| | | * |
| | | * @return the string representation of this message. |
| | | */ |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return "[" + getClass().getCanonicalName() + " sender=" + senderID |
| | | + " destination=" + destination + "]"; |
| | | return "[" + getClass().getSimpleName() + " sender=" + senderID + " destination=" + destination + "]"; |
| | | } |
| | | } |