Commit dd5e081d authored by Andre Freyssinet's avatar Andre Freyssinet

Javadoc enhancements.

parent 939bf601
......@@ -83,8 +83,6 @@ public class AdminReply extends AbstractAdminMessage {
/**
* Constructs an <code>AdminReply</code> instance for simple error cases.
*
* @param success <code>true</code> if this reply replies to a successful
* request.
* @param errorCode error code defining the type of the error
* @param info Information to carry.
*/
......
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2003 - 2010 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): ScalAgent Distributed Technologies
*/
package org.objectweb.joram.shared.admin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import fr.dyade.aaa.common.stream.StreamUtil;
/**
* A <code>Monitor_GetFatherRep</code> instance holds the identifier of a
* topic's hierarchical father.
*/
public class GetFatherReply extends AdminReply {
private static final long serialVersionUID = 1L;
/** Identifier of the hierarchical father. */
private String fatherId;
/**
* Constructs a <code>Monitor_GetFatherRep</code> instance.
*
* @param fatherId Identifier of the hierarchical father.
*/
public GetFatherReply(String fatherId) {
super(true, null);
this.fatherId = fatherId;
}
/** Returns the identifier of the hierarchical father. */
public String getFatherId() {
return fatherId;
}
public GetFatherReply() { }
protected int getClassId() {
return MONITOR_GET_FATHER_REP;
}
public void readFrom(InputStream is) throws IOException {
super.readFrom(is);
fatherId = StreamUtil.readStringFrom(is);
}
public void writeTo(OutputStream os) throws IOException {
super.writeTo(os);
StreamUtil.writeTo(fatherId, os);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2003 - 2020 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): ScalAgent Distributed Technologies
*/
package org.objectweb.joram.shared.admin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import fr.dyade.aaa.common.stream.StreamUtil;
/**
* A <code>Monitor_GetFatherRep</code> instance holds the identifier of a
* topic's hierarchical father.
*/
public class GetFatherReply extends AdminReply {
private static final long serialVersionUID = 1L;
/** Identifier of the hierarchical father. */
private String fatherId;
/**
* Constructs a <code>Monitor_GetFatherRep</code> instance.
*
* @param fatherId Identifier of the hierarchical father.
*/
public GetFatherReply(String fatherId) {
super(true, null);
this.fatherId = fatherId;
}
/**
* Returns the identifier of the hierarchical father.
*
* @return The identifier of the hierarchical father.
*/
public String getFatherId() {
return fatherId;
}
public GetFatherReply() { }
protected int getClassId() {
return MONITOR_GET_FATHER_REP;
}
public void readFrom(InputStream is) throws IOException {
super.readFrom(is);
fatherId = StreamUtil.readStringFrom(is);
}
public void writeTo(OutputStream os) throws IOException {
super.writeTo(os);
StreamUtil.writeTo(fatherId, os);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2015 ScalAgent Distributed Technologies
* Copyright (C) 2015 - 2020 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -42,13 +42,19 @@ public class GetJMXAttsReply extends AdminReply {
/**
* Constructs a <code>Monitor_GetStatRep</code> instance.
*
* @param stats The available statistics.
*/
public GetJMXAttsReply(Hashtable stats) {
super(true, null);
this.stats = stats;
}
/** Returns the stats table. */
/**
* Returns the statistics table.
*
* @return The available statistics.
*/
public Hashtable getStats() {
return stats;
}
......
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2015 ScalAgent Distributed Technologies
* Copyright (C) 2015 - 2020 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -63,12 +63,20 @@ public class GetJMXAttsRequest extends AdminRequest {
public GetJMXAttsRequest() { }
/** Returns the identifier of the destination. */
/**
* Returns the identifier of the destination.
*
* @return The identifier of the destination.
*/
public String getDest() {
return destId;
}
/** Returns the comma separated list of requested JMX attribute names. */
/**
* Returns the comma separated list of requested JMX attribute names.
*
* @return An array of requested JMX attribute names.
*/
public String[] getAttributes() {
return attributes.split(";");
}
......
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2005 - 2011 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package org.objectweb.joram.shared.admin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import fr.dyade.aaa.common.stream.StreamUtil;
/**
* A <code>Monitor_GetNbMaxMsg</code> instance requests the
* NbMaxMsg of the destination.
*/
public class GetNbMaxMsgRequest extends DestinationAdminRequest {
/** subscription name */
private String subName = null;
/**
* Constructs a <code>Monitor_GetNbMaxMsg</code> instance.
*
* @param destId Identifier of the destination.
*/
public GetNbMaxMsgRequest(String destId) {
super(destId);
}
public GetNbMaxMsgRequest() { }
/**
* Constructs a <code>Monitor_GetNbMaxMsg</code> instance.
*
* @param destId Identifier of the destination.
* @param subName Subscription name.
*/
public GetNbMaxMsgRequest(String destId, String subName) {
super(destId);
this.subName = subName;
}
/** Returns SubName */
public String getSubName() {
return subName;
}
protected int getClassId() {
return MONITOR_GET_NB_MAX_MSG;
}
public void readFrom(InputStream is) throws IOException {
super.readFrom(is);
subName = StreamUtil.readStringFrom(is);
}
public void writeTo(OutputStream os) throws IOException {
super.writeTo(os);
StreamUtil.writeTo(subName, os);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2005 - 2020 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package org.objectweb.joram.shared.admin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import fr.dyade.aaa.common.stream.StreamUtil;
/**
* A <code>Monitor_GetNbMaxMsg</code> instance requests the
* NbMaxMsg of the destination.
*/
public class GetNbMaxMsgRequest extends DestinationAdminRequest {
/** subscription name */
private String subName = null;
/**
* Constructs a <code>Monitor_GetNbMaxMsg</code> instance.
*
* @param destId Identifier of the destination.
*/
public GetNbMaxMsgRequest(String destId) {
super(destId);
}
public GetNbMaxMsgRequest() { }
/**
* Constructs a <code>Monitor_GetNbMaxMsg</code> instance.
*
* @param destId Identifier of the destination.
* @param subName Subscription name.
*/
public GetNbMaxMsgRequest(String destId, String subName) {
super(destId);
this.subName = subName;
}
/**
* Returns SubName
*
* @return the subscription identifier.
*/
public String getSubName() {
return subName;
}
protected int getClassId() {
return MONITOR_GET_NB_MAX_MSG;
}
public void readFrom(InputStream is) throws IOException {
super.readFrom(is);
subName = StreamUtil.readStringFrom(is);
}
public void writeTo(OutputStream os) throws IOException {
super.writeTo(os);
StreamUtil.writeTo(subName, os);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2003 - 2010 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): ScalAgent Distributed Technologies
*/
package org.objectweb.joram.shared.admin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import fr.dyade.aaa.common.stream.StreamUtil;
/**
* A <code>Monitor_GetNumberRep</code> instance is a reply wrapping an
* integer value.
*/
public class GetNumberReply extends AdminReply {
private static final long serialVersionUID = 1L;
/** The integer value. */
private int number;
/**
* Constructs a <code>Monitor_GetNumberRep</code> instance.
*
* @param number The value to wrap.
*/
public GetNumberReply(int number) {
super(true, null);
this.number = number;
}
/** Returns the wrapped value. */
public int getNumber() {
return number;
}
public GetNumberReply() { }
protected int getClassId() {
return MONITOR_GET_NUMBER_REP;
}
public void readFrom(InputStream is) throws IOException {
super.readFrom(is);
number = StreamUtil.readIntFrom(is);
}
public void writeTo(OutputStream os) throws IOException {
super.writeTo(os);
StreamUtil.writeTo(number, os);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2003 - 2020 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): ScalAgent Distributed Technologies
*/
package org.objectweb.joram.shared.admin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import fr.dyade.aaa.common.stream.StreamUtil;
/**
* A <code>Monitor_GetNumberRep</code> instance is a reply wrapping an
* integer value.
*/
public class GetNumberReply extends AdminReply {
private static final long serialVersionUID = 1L;
/** The integer value. */
private int number;
/**
* Constructs a <code>Monitor_GetNumberRep</code> instance.
*
* @param number The value to wrap.
*/
public GetNumberReply(int number) {
super(true, null);
this.number = number;
}
/**
* Returns the wrapped value.
*
* @return The wrapped value.
*/
public int getNumber() {
return number;
}
public GetNumberReply() { }
protected int getClassId() {
return MONITOR_GET_NUMBER_REP;
}
public void readFrom(InputStream is) throws IOException {
super.readFrom(is);
number = StreamUtil.readIntFrom(is);
}
public void writeTo(OutputStream os) throws IOException {
super.writeTo(os);
StreamUtil.writeTo(number, os);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2010 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package org.objectweb.joram.shared.admin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.Hashtable;
import fr.dyade.aaa.common.stream.StreamUtil;
/**
* A <code>Monitor_GetUsersRep</code> instance replies to a get users,
* readers or writers monitoring request.
*/
public class GetRightsReply extends AdminReply {
/** define serialVersionUID for interoperability */
private static final long serialVersionUID = 1L;
/** True if all users can read this destination. */
private boolean isFreeReading;
/** True if all users can write this destination. */
private boolean isFreeWriting;
/** Table holding the readers identifications. */
private Hashtable readers;
/** Table holding the writers identifications. */
private Hashtable writers;
/**
* Constructs a <code>Monitor_GetUsersRep</code> instance.
*/
public GetRightsReply(boolean success, String info,
boolean isFreeReading, boolean isFreeWriting) {
super(success, info);
this.isFreeReading = isFreeReading;
this.isFreeWriting = isFreeWriting;
readers = new Hashtable();
writers = new Hashtable();
}
/**
* Returns true if all users can read this destination
*/
public boolean isFreeReading() {
return isFreeReading;
}
/**
* Returns true if all users write read this destination
*/
public boolean isFreeWriting() {
return isFreeWriting;
}
/** Adds a reader to the table. */
public void addReader(String name, String proxyId) {
readers.put(name, proxyId);
}