|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.Agent
org.objectweb.joram.mom.dest.Destination
org.objectweb.joram.mom.dest.Topic
org.objectweb.joram.mom.dest.AdminTopic
public final class AdminTopic
The AdminTopic
class implements the administration topic
behavior, basically processing administration requests.
It receives administration requests from the client encapsulated in JMS messages:
Nested Class Summary | |
---|---|
static class |
AdminTopic.DestinationDesc
|
Field Summary |
---|
Fields inherited from class org.objectweb.joram.mom.dest.Topic |
---|
alreadySentLocally, fatherId, friends, logger, selectors, subscribers |
Fields inherited from class org.objectweb.joram.mom.dest.Destination |
---|
_rights, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, task, WAKEUP_PERIOD, WRITE |
Fields inherited from class fr.dyade.aaa.agent.Agent |
---|
emptyString, fixed, logmon |
Constructor Summary | |
---|---|
AdminTopic()
Constructs an AdminTopic agent. |
Method Summary | |
---|---|
protected void |
clusterJoin(ClusterJoinNot not)
Overrides this Topic method; if this AdminTopic is on
server0, new cluster fellow is notified to other fellows and other
fellows are notified to it. |
protected void |
clusterJoinAck(ClusterJoinAck ack)
Overrides this Topic method; a ClusterAck is not
expected by an AdminTopic. |
void |
createQueue(java.lang.String name)
Creates a new queue on the local server. |
void |
createQueue(java.lang.String name,
int serverId)
Creates a new queue on the selected server. |
void |
createQueue(java.lang.String name,
java.lang.String queueClassName,
int serverId)
Creates a new queue on the selected server. |
void |
createTopic(java.lang.String name)
Creates a new topic on the local server. |
void |
createTopic(java.lang.String name,
int serverId)
Creates a new topic on the selected server. |
void |
createTopic(java.lang.String name,
java.lang.String topicClassName,
int serverId)
Creates a new topic on the selected server. |
void |
createUser(java.lang.String user,
java.lang.String passwd)
Creates a new user on the local server. |
void |
createUser(java.lang.String user,
java.lang.String passwd,
int serverId)
Creates a new user on the selected server. |
void |
createUser(java.lang.String user,
java.lang.String passwd,
int serverId,
java.lang.String identityClassName)
Creates a new user on the selected server. |
void |
deleteNot(AgentId from,
DeleteNot not)
Overrides this Destination method. |
static void |
deleteUser(java.lang.String userName)
|
protected void |
doUnknownAgent(UnknownAgent uA)
Specializes this Topic reaction. |
static AgentId |
getDefault()
Gets the identifier of the default administration topic on the current server. |
static AgentId |
getDefault(short serverId)
Gets the identifier of the default administration topic on a given server. |
protected void |
handleDeniedMessage(java.lang.String msgId,
AgentId replyTo)
Method used to send a response when a message is denied because of a lack of rights. |
static boolean |
isAdminTopicId(AgentId id)
Returns true if the given AgentId is the unique identifier of an AdminTopic agent. |
static AdminTopic.DestinationDesc |
lookupDest(java.lang.String name,
byte type)
Retrieves an existing destination. |
protected ClientMessages |
preProcess(AgentId from,
ClientMessages msgs)
Overrides this Destination method; |
void |
react(AgentId from,
Notification not)
Distributes the received notifications to the appropriate reactions. |
static void |
registerDest(AgentId id,
java.lang.String name,
byte type)
Registers a newly created destination. |
protected void |
requestGroupNot(AgentId from,
RequestGroupNot not)
|
protected void |
topicForwardNot(AgentId from,
TopicForwardNot not)
Overrides this Topic method; the forwarded messages
contain admin requests and will be processed. |
java.lang.String |
toString()
Returns a string representation of this destination. |
static void |
unregisterDest(java.lang.String name)
Removes a registered destination. |
Methods inherited from class org.objectweb.joram.mom.dest.Topic |
---|
doClientMessages, doDeleteNot, doRightRequest, forwardMessages, getClusterElements, getNbMsgsReceiveSinceCreation, getNumberOfSubscribers, getSubscriberIds, getType, handleAdminRequestNot, initialize, postSubscribe, postUnsubscribe, preSubscribe, preUnsubscribe, processMessages, sendToCluster, setAlreadySentLocally, subscribeRequest, unsubscribeRequest, wakeUpNot |
Methods inherited from class fr.dyade.aaa.agent.Agent |
---|
delete, delete, deploy, deploy, getAgentId, getCommitTime, getId, getLogTopic, getName, getReactNb, getReactTime, isDeployed, isFixed, needToBeCommited, save, sendTo, sendTo, sendTo, setName, setNoSave, setSave |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.joram.mom.dest.TopicMBean |
---|
getNumberOfSubscribers, getSubscriberIds |
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationMBean |
---|
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod |
Methods inherited from interface fr.dyade.aaa.agent.AgentMBean |
---|
getAgentId, getCommitTime, getReactNb, getReactTime, isFixed |
Methods inherited from interface org.objectweb.joram.mom.dest.ClusterDestinationMBean |
---|
getClusterElements |
Constructor Detail |
---|
public AdminTopic() throws RequestException
AdminTopic
agent.
RequestException
Method Detail |
---|
public java.lang.String toString()
Topic
toString
in interface AgentMBean
toString
in interface DestinationMBean
toString
in class Topic
public static AgentId getDefault(short serverId)
public static final AgentId getDefault()
public static final boolean isAdminTopicId(AgentId id)
id
- the AgentId to verify.
public void react(AgentId from, Notification not) throws java.lang.Exception
react
in class Topic
from
- agent sending notificationnot
- notification to react to
java.lang.Exception
protected void handleDeniedMessage(java.lang.String msgId, AgentId replyTo)
handleDeniedMessage
in class Destination
protected void requestGroupNot(AgentId from, RequestGroupNot not)
requestGroupNot
in class Destination
protected ClientMessages preProcess(AgentId from, ClientMessages msgs)
Destination
method;
preProcess
in class Destination
msgs
- ClientMessages
notifications hold requests sent by
an administrator.from
- The sender of the message
protected void clusterJoinAck(ClusterJoinAck ack)
Topic
method; a ClusterAck
is not
expected by an AdminTopic.
clusterJoinAck
in class Topic
protected void clusterJoin(ClusterJoinNot not)
Topic
method; if this AdminTopic is on
server0, new cluster fellow is notified to other fellows and other
fellows are notified to it.
clusterJoin
in class Topic
protected void topicForwardNot(AgentId from, TopicForwardNot not)
Topic
method; the forwarded messages
contain admin requests and will be processed.
topicForwardNot
in class Topic
public void deleteNot(AgentId from, DeleteNot not)
Destination
method.
Deletion requests are not accepted by AdminTopics.
deleteNot
in class Destination
protected void doUnknownAgent(UnknownAgent uA)
Topic
reaction.
doUnknownAgent
in class Topic
public void createUser(java.lang.String user, java.lang.String passwd) throws java.lang.Exception
SimpleIdentity
class is
used.
createUser
in interface AdminTopicMBean
user
- the user namepasswd
- the user password
java.lang.Exception
public void createUser(java.lang.String user, java.lang.String passwd, int serverId) throws java.lang.Exception
SimpleIdentity
class is
used.
createUser
in interface AdminTopicMBean
user
- the user namepasswd
- the user passwordserverId
- the server where the user will be created
java.lang.Exception
public void createUser(java.lang.String user, java.lang.String passwd, int serverId, java.lang.String identityClassName) throws java.lang.Exception
createUser
in interface AdminTopicMBean
user
- the user namepasswd
- the user passwordserverId
- the server where the user will be createdidentityClassName
- the identity class name to instantiate
java.lang.Exception
public void createQueue(java.lang.String name)
createQueue
in interface AdminTopicMBean
name
- the queue namepublic void createQueue(java.lang.String name, int serverId)
Queue
.
createQueue
in interface AdminTopicMBean
name
- the topic nameserverId
- the server where the queue will be deployedpublic void createQueue(java.lang.String name, java.lang.String queueClassName, int serverId)
createQueue
in interface AdminTopicMBean
name
- the topic namequeueClassName
- the queue class to instantiateserverId
- the server where the queue will be deployedpublic void createTopic(java.lang.String name)
createTopic
in interface AdminTopicMBean
name
- the topic namepublic void createTopic(java.lang.String name, int serverId)
Topic
.
createTopic
in interface AdminTopicMBean
name
- the topic nameserverId
- the server where the topic will be deployedpublic void createTopic(java.lang.String name, java.lang.String topicClassName, int serverId)
createTopic
in interface AdminTopicMBean
name
- the topic nametopicClassName
- the topic class to instantiateserverId
- the server where the topic will be deployedpublic static void deleteUser(java.lang.String userName)
public static AdminTopic.DestinationDesc lookupDest(java.lang.String name, byte type) throws RequestException
name
- The name of the destination.type
- The type of the destination.
RequestException
- If the existing destination have a different type.public static void registerDest(AgentId id, java.lang.String name, byte type)
id
- The unique identifier of the created destination.name
- The name of the created destination.type
- The type of the created destination.
java.io.IOException
- If an error occurs during saving.public static void unregisterDest(java.lang.String name)
name
- The name of the destination to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |