Package org.objectweb.joram.shared.admin
Class AdminReply
- java.lang.Object
-
- org.objectweb.joram.shared.admin.AbstractAdminMessage
-
- org.objectweb.joram.shared.admin.AdminReply
-
- All Implemented Interfaces:
Streamable,Externalizable,Serializable
- Direct Known Subclasses:
AdminCommandReply,ClusterListReply,CreateDestinationReply,CreateUserReply,GetDestinationsReply,GetDMQSettingsReply,GetDomainNamesRep,GetFatherReply,GetJMXAttsReply,GetLocalServerRep,GetNumberReply,GetQueueMessageIdsRep,GetQueueMessageRep,GetRightsReply,GetServersIdsReply,GetStatsReply,GetSubscriberIdsRep,GetSubscriptionMessageIdsRep,GetSubscriptionMessageRep,GetSubscriptionRep,GetSubscriptionsRep,GetUsersReply
public class AdminReply extends AbstractAdminMessage
AnAdminReplyis a reply sent by aorg.objectweb.joram.mom.dest.AdminTopictopic and containing data or information destinated to a client administrator.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intBAD_CLUSTER_REQUESTprivate interrorCodeCode d'erreurstatic intILLEGAL_STATEprivate StringinfoInformation.static intNAME_ALREADY_USEDstatic intNAME_UNKNOWNstatic intPERMISSION_DENIEDprivate static longserialVersionUIDDefine serialVersionUID for interoperability.static intSERVER_ID_ALREADY_USEDstatic intSTART_FAILUREprivate booleansuccesstrueif this reply replies to a successful request.static intUNKNOWN_DESTINATIONstatic intUNKNOWN_REQUESTstatic intUNKNOWN_SERVER-
Fields inherited from class org.objectweb.joram.shared.admin.AbstractAdminMessage
ABSTRACT_ADMIN_MESSAGE, ADD_DESTINATION_CLUSTER, ADD_DOMAIN_REQUEST, ADD_REMOTE_DEST, ADD_SERVER_REQUEST, ADD_SERVICE_REQUEST, ADMIN_REPLY, ADMIN_REQUEST, classid, classnames, CLEAR_QUEUE, CLEAR_SUBSCRIPTION, CMD_ADMIN_REPLY, CMD_ADMIN_REQUEST, CREATE_DESTINATION_REPLY, CREATE_DESTINATION_REQUEST, CREATE_USER_REPLY, CREATE_USER_REQUEST, DEL_REMOTE_DEST, DELETE_DESTINATION, DELETE_QUEUE_MESSAGE, DELETE_SUBSCRIPTION_MESSAGE, DELETE_USER, GET_CONFIG_REQUEST, GET_DOMAIN_NAMES, GET_DOMAIN_NAMES_REP, GET_LOCAL_SERVER, GET_LOCAL_SERVER_REP, GET_QUEUE_MESSAGE, GET_QUEUE_MESSAGE_IDS, GET_QUEUE_MESSAGE_IDS_REP, GET_QUEUE_MESSAGE_REP, GET_RIGHTS_REPLY, GET_RIGHTS_REQUEST, GET_SUBSCRIBER_IDS, GET_SUBSCRIBER_IDS_REP, GET_SUBSCRIPTION, GET_SUBSCRIPTION_MESSAGE, GET_SUBSCRIPTION_MESSAGE_IDS, GET_SUBSCRIPTION_MESSAGE_IDS_REP, GET_SUBSCRIPTION_MESSAGE_REP, GET_SUBSCRIPTION_REP, GET_SUBSCRIPTIONS, GET_SUBSCRIPTIONS_REP, GET_USERS_REPLY, GET_USERS_REQUEST, LIST_CLUSTER_DEST, LIST_CLUSTER_DEST_REP, MONITOR_GET_DELIVERED_MESSAGES, MONITOR_GET_DESTINATIONS, MONITOR_GET_DESTINATIONS_REP, MONITOR_GET_DMQ_SETTINGS, MONITOR_GET_DMQ_SETTINGS_REP, MONITOR_GET_FATHER, MONITOR_GET_FATHER_REP, MONITOR_GET_JMX_ATTS, MONITOR_GET_JMX_ATTS_REP, MONITOR_GET_NB_MAX_MSG, MONITOR_GET_NUMBER_REP, MONITOR_GET_PENDING_MESSAGES, MONITOR_GET_PENDING_REQUESTS, MONITOR_GET_SERVERS_IDS, MONITOR_GET_SERVERS_IDS_REP, MONITOR_GET_STAT, MONITOR_GET_STAT_REP, MONITOR_GET_SUBSCRIPTIONS, NULL_CLASS_ID, REMOVE_DESTINATION_CLUSTER, REMOVE_DOMAIN_REQUEST, REMOVE_SERVER_REQUEST, REMOVE_SERVICE_REQUEST, SCALE_REQUEST, SET_DMQ, SET_FATHER, SET_NB_MAX_MSG, SET_READER, SET_RIGHT, SET_SYNC_EXCEPTION_ON_FULL_DEST, SET_THRESHOLD, SET_WRITER, SND_DEST_WEIGHTS, STOP_SERVER_REQUEST, SUBSCRIPTION_ADMIN_REQUEST, UNSET_READER, UNSET_WRITER, UPDATE_USER, USER_ADMIN_REQUEST, XXX_MONITOR_GET_CLUSTER, XXX_MONITOR_GET_NB_MAX_MSG_REP, XXX_MONITOR_GET_READERS, XXX_MONITOR_GET_WRITERS, XXX_MONITOR_REPLY, XXX_MONITOR_REQUEST, XXX_QUEUE_ADMIN_REQUEST, XXX_SET_CLUSTER, XXX_SET_DEFAULT_DMQ, XXX_SET_QUEUE_THRESHOLD, XXX_SET_USER_DMQ, XXX_SET_USER_THRESHOLD, XXX_SPECIAL_ADMIN, XXX_UNSET_CLUSTER, XXX_UNSET_DEFAULT_DMQ, XXX_UNSET_DEFAULT_THRESHOLD, XXX_UNSET_DESTINATION_DMQ, XXX_UNSET_FATHER, XXX_UNSET_QUEUE_THRESHOLD, XXX_UNSET_USER_DMQ, XXX_UNSET_USER_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description AdminReply()AdminReply(boolean success, String info)Constructs anAdminReplyinstance.AdminReply(int errorCode, String info)Constructs anAdminReplyinstance for simple error cases.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetClassId()intgetErrorCode()Returns the error code.StringgetInfo()Returns the carried info.voidreadFrom(InputStream is)The object implements the readFrom method to restore its contents from the input stream.booleansucceeded()Returnstrueif this reply replies to a successful request.StringtoString()voidwriteTo(OutputStream os)The object implements the writeTo method to write its contents to the output stream.-
Methods inherited from class org.objectweb.joram.shared.admin.AbstractAdminMessage
read, readExternal, write, writeExternal
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Define serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
NAME_ALREADY_USED
public static final int NAME_ALREADY_USED
- See Also:
- Constant Field Values
-
START_FAILURE
public static final int START_FAILURE
- See Also:
- Constant Field Values
-
SERVER_ID_ALREADY_USED
public static final int SERVER_ID_ALREADY_USED
- See Also:
- Constant Field Values
-
UNKNOWN_SERVER
public static final int UNKNOWN_SERVER
- See Also:
- Constant Field Values
-
PERMISSION_DENIED
public static final int PERMISSION_DENIED
- See Also:
- Constant Field Values
-
UNKNOWN_REQUEST
public static final int UNKNOWN_REQUEST
- See Also:
- Constant Field Values
-
NAME_UNKNOWN
public static final int NAME_UNKNOWN
- See Also:
- Constant Field Values
-
BAD_CLUSTER_REQUEST
public static final int BAD_CLUSTER_REQUEST
- See Also:
- Constant Field Values
-
UNKNOWN_DESTINATION
public static final int UNKNOWN_DESTINATION
- See Also:
- Constant Field Values
-
ILLEGAL_STATE
public static final int ILLEGAL_STATE
- See Also:
- Constant Field Values
-
success
private boolean success
trueif this reply replies to a successful request.
-
info
private String info
Information.
-
errorCode
private int errorCode
Code d'erreur
-
-
Constructor Detail
-
AdminReply
public AdminReply(boolean success, String info)Constructs anAdminReplyinstance.- Parameters:
success-trueif this reply replies to a successful request.info- Information to carry.
-
AdminReply
public AdminReply(int errorCode, String info)Constructs anAdminReplyinstance for simple error cases.- Parameters:
errorCode- error code defining the type of the errorinfo- Information to carry.
-
AdminReply
public AdminReply()
-
-
Method Detail
-
succeeded
public final boolean succeeded()
Returnstrueif this reply replies to a successful request.- Returns:
- true if this reply replies to a successful request.
-
getInfo
public final String getInfo()
Returns the carried info.- Returns:
- the carried info.
-
getErrorCode
public final int getErrorCode()
Returns the error code.- Returns:
- the error code.
-
getClassId
protected int getClassId()
- Specified by:
getClassIdin classAbstractAdminMessage
-
writeTo
public void writeTo(OutputStream os) throws IOException
Description copied from interface:StreamableThe object implements the writeTo method to write its contents to the output stream.- Parameters:
os- the stream to write the object to- Throws:
IOException- an error occurs during IO operation.
-
readFrom
public void readFrom(InputStream is) throws IOException
Description copied from interface:StreamableThe object implements the readFrom method to restore its contents from the input stream.- Parameters:
is- the stream to read data from in order to restore the object- Throws:
IOException- an error occurs during IO operation.
-
-