Joram 5.3.0

org.objectweb.joram.mom.dest
Class AdminTopicImpl

java.lang.Object
  extended by org.objectweb.joram.mom.dest.DestinationImpl
      extended by org.objectweb.joram.mom.dest.TopicImpl
          extended by org.objectweb.joram.mom.dest.AdminTopicImpl
All Implemented Interfaces:
java.io.Serializable, AdminTopicImplMBean, DestinationImplMBean, TopicImplMBean

public final class AdminTopicImpl
extends TopicImpl
implements AdminTopicImplMBean

The AdminTopicImpl class implements the admin topic behavior, basically processing administration requests.

See Also:
Serialized Form

Nested Class Summary
static class AdminTopicImpl.DestinationDesc
           
 
Field Summary
 
Fields inherited from class org.objectweb.joram.mom.dest.TopicImpl
alreadySentLocally, fatherId, friends, selectors, subscribers
 
Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl
_rights, agent, clients, creationDate, dmqId, freeReading, freeWriting, logger, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, WAKEUP_PERIOD, WRITE
 
Constructor Summary
AdminTopicImpl(fr.dyade.aaa.agent.AgentId topicId)
          Constructs an AdminTopicImpl instance.
 
Method Summary
 void AdminNotification(fr.dyade.aaa.agent.AgentId from, AdminNotification adminNot)
          Method implementing the reaction to a org.objectweb.joram.mom.proxies.AdminNotification notification notifying of the creation of an admin proxy.
 void AdminReply(fr.dyade.aaa.agent.AgentId from, AdminReply not)
          Method implementing the reaction to a org.objectweb.joram.mom.notifications.AdminReply notification replying to an administration request.
 void AdminRequestNot(fr.dyade.aaa.agent.AgentId from, org.objectweb.joram.mom.dest.AdminTopicImpl.AdminRequestNot adminNot)
          Method implementing the reaction to a AdminRequest notification notifying of the creation of an admin proxy.
 void clusterAck(fr.dyade.aaa.agent.AgentId from, org.objectweb.joram.mom.dest.ClusterAck ack)
          Overrides this TopicImpl method; a ClusterAck is not expected by an AdminTopic.
 void clusterNot(fr.dyade.aaa.agent.AgentId from, org.objectweb.joram.mom.dest.ClusterNot not)
          Overrides this TopicImpl method; if this AdminTopic is on server0, new cluster fellow is notified to other fellows and other fellows are notified to it.
 void clusterRequest(fr.dyade.aaa.agent.AgentId from, ClusterRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept ClusterRequest notifications.
 void clusterTest(fr.dyade.aaa.agent.AgentId from, org.objectweb.joram.mom.dest.ClusterTest request)
          Overrides this TopicImpl method; AdminTopics do not accept to join clusters other than their admin topics cluster.
 AdminTopicImpl.DestinationDesc createDestination(java.lang.String destName, fr.dyade.aaa.agent.AgentId adminId, java.util.Properties properties, byte type, java.lang.String className, java.lang.String requestClassName, java.lang.StringBuffer strbuf)
          Instantiating the destination class or retrieving the destination.
static AdminTopicImpl.DestinationDesc createDestinationAndSave(java.lang.String destName, fr.dyade.aaa.agent.AgentId adminId, java.util.Properties properties, byte type, java.lang.String className, java.lang.String requestClassName, java.lang.StringBuffer strbuf)
          Deprecated.  
static void CreateUserAndSave(CreateUserRequest request, fr.dyade.aaa.agent.AgentId replyTo, java.lang.String msgId)
          Deprecated.  
 void deleteNot(fr.dyade.aaa.agent.AgentId from, fr.dyade.aaa.agent.DeleteNot not)
          Overrides this DestinationImpl method; deletion requests are not accepted by AdminTopics.
 void doProcess(CreateUserRequest request, fr.dyade.aaa.agent.AgentId replyTo, java.lang.String msgId)
          Processes a CreateUserRequest instance requesting the creation of a UserAgent for a given user.
 void doProcess(SetRight request, fr.dyade.aaa.agent.AgentId replyTo, java.lang.String msgId)
          Processes a SetRight instance requesting to grant a user a given right on a given destination.
protected  void doUnknownAgent(fr.dyade.aaa.agent.UnknownAgent uA)
          Specializes this TopicImpl reaction.
 void fatherAck(fr.dyade.aaa.agent.AgentId from, org.objectweb.joram.mom.dest.FatherAck ack)
          Overrides this TopicImpl method; a FatherAck acknowledges the process of creating a hierarchy of topics.
 void fatherTest(fr.dyade.aaa.agent.AgentId from, org.objectweb.joram.mom.dest.FatherTest not)
          Overrides this TopicImpl method; AdminTopics do not accept to join a hierarchy.
 java.lang.String getName(fr.dyade.aaa.agent.AgentId proxyId)
          Method used by proxies for retrieving their name.
 java.lang.Object getPassword(fr.dyade.aaa.agent.AgentId proxyId)
          Method used by proxies for retrieving their password.
 fr.dyade.aaa.agent.AgentId getProxyId(Identity identity, java.lang.String inaddr)
          Method used by ConnectionManager proxies to check their clients identification.
 void GetProxyIdListNot(GetProxyIdListNot not)
           
 void GetProxyIdNot(GetProxyIdNot not)
           
protected  void handleDeniedMessage(java.lang.String msgId, fr.dyade.aaa.agent.AgentId replyTo)
          Method used to send a response when a message is denied because of a lack of rights.
static boolean isDestinationTableContain(java.lang.String destName)
          Deprecated.  
 boolean isTaken(java.lang.String name)
          Method used by proxies for checking if a given name is already used.
 void postProcess(SetRightRequest req)
           
 ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from, ClientMessages msgs)
          Overrides this DestinationImpl method; ClientMessages notifications hold requests sent by an administrator.
 SetRightRequest preProcess(SetRightRequest req)
           
 void RegisterDestNot(RegisterDestNot not)
           
 void RegisteredDestNot(fr.dyade.aaa.agent.AgentId from, RegisteredDestNot not)
           
 void RegisterTmpDestNot(RegisterTmpDestNot not)
           
 void requestGroupNot(fr.dyade.aaa.agent.AgentId from, RequestGroupNot not)
           
 void setDMQRequest(fr.dyade.aaa.agent.AgentId from, SetDMQRequest request)
          Overrides this DestinationImpl method; AdminTopics do not accept SetDMQRequest notifications.
 void setFatherRequest(fr.dyade.aaa.agent.AgentId from, SetFatherRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept SetFatherRequest notifications.
static void setRightAndSave(SetRight request, fr.dyade.aaa.agent.AgentId replyTo, java.lang.String msgId)
          Processes a SetRight instance requesting to grant a user a given right on a given destination.
 void setRightRequest(fr.dyade.aaa.agent.AgentId from, SetRightRequest request)
          Overrides this DestinationImpl method; AdminTopics do not accept SetRightRequest notifications.
 void topicForwardNot(fr.dyade.aaa.agent.AgentId from, TopicForwardNot not)
          Overrides this TopicImpl method; the forwarded messages contain admin requests and will be processed.
 java.lang.String toString()
          Returns a string representation of this destination.
 void unclusterRequest(fr.dyade.aaa.agent.AgentId from, UnclusterRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept UnclusterRequest notifications.
 void unsetFatherRequest(fr.dyade.aaa.agent.AgentId from, UnsetFatherRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept UnsetFatherRequest notifications.
 
Methods inherited from class org.objectweb.joram.mom.dest.TopicImpl
destinationAdminRequestNot, doClientMessages, doDeleteNot, doRightRequest, forwardMessages, getNbMsgsReceiveSinceCreation, getSubscriberIds, initialize, monitGetCluster, monitGetFather, monitGetSubscriptions, postSubscribe, postUnsubscribe, preSubscribe, preUnsubscribe, processMessages, setAlreadySentLocally, subscribeRequest, unclusterNot, unsubscribeRequest, wakeUpNot
 
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl
canBeDeleted, clientMessages, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getId, getJMXStatistics, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isValidJMXAttribute, isWriter, monitFreeAccess, monitGetDMQSettings, monitGetReaders, monitGetStat, monitGetWriters, postProcess, processSetRight, replyToTopic, setAgent, setFreeReading, setFreeWriting, setPeriod, specialAdminProcess, specialAdminRequest, unknownAgent
 
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.TopicImplMBean
getSubscriberIds
 
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationImplMBean
getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
 

Constructor Detail

AdminTopicImpl

public AdminTopicImpl(fr.dyade.aaa.agent.AgentId topicId)
Constructs an AdminTopicImpl instance.

Parameters:
topicId - Identifier of the agent hosting the AdminTopicImpl.
Method Detail

toString

public java.lang.String toString()
Description copied from class: TopicImpl
Returns a string representation of this destination.

Specified by:
toString in interface DestinationImplMBean
Overrides:
toString in class TopicImpl

getProxyId

public fr.dyade.aaa.agent.AgentId getProxyId(Identity identity,
                                             java.lang.String inaddr)
                                      throws java.lang.Exception
Method used by ConnectionManager proxies to check their clients identification.

Parameters:
identity -
inaddr -
Returns:
The agent unique identifier of the authentified user.
Throws:
java.lang.Exception - If the user does not exist, is wrongly identified, or does not have any proxy deployed.
See Also:
ConnectionManager

getName

public java.lang.String getName(fr.dyade.aaa.agent.AgentId proxyId)
Method used by proxies for retrieving their name.


getPassword

public java.lang.Object getPassword(fr.dyade.aaa.agent.AgentId proxyId)
Method used by proxies for retrieving their password.


isTaken

public boolean isTaken(java.lang.String name)
Method used by proxies for checking if a given name is already used.


handleDeniedMessage

protected void handleDeniedMessage(java.lang.String msgId,
                                   fr.dyade.aaa.agent.AgentId replyTo)
Method used to send a response when a message is denied because of a lack of rights.

Overrides:
handleDeniedMessage in class DestinationImpl

AdminNotification

public void AdminNotification(fr.dyade.aaa.agent.AgentId from,
                              AdminNotification adminNot)
Method implementing the reaction to a org.objectweb.joram.mom.proxies.AdminNotification notification notifying of the creation of an admin proxy.


AdminRequestNot

public void AdminRequestNot(fr.dyade.aaa.agent.AgentId from,
                            org.objectweb.joram.mom.dest.AdminTopicImpl.AdminRequestNot adminNot)
Method implementing the reaction to a AdminRequest notification notifying of the creation of an admin proxy.


AdminReply

public void AdminReply(fr.dyade.aaa.agent.AgentId from,
                       AdminReply not)
Method implementing the reaction to a org.objectweb.joram.mom.notifications.AdminReply notification replying to an administration request.

A reply is sent back to the connected administrator if needed.


GetProxyIdNot

public void GetProxyIdNot(GetProxyIdNot not)

GetProxyIdListNot

public void GetProxyIdListNot(GetProxyIdListNot not)

RegisterTmpDestNot

public void RegisterTmpDestNot(RegisterTmpDestNot not)

RegisterDestNot

public void RegisterDestNot(RegisterDestNot not)

RegisteredDestNot

public void RegisteredDestNot(fr.dyade.aaa.agent.AgentId from,
                              RegisteredDestNot not)

setRightRequest

public void setRightRequest(fr.dyade.aaa.agent.AgentId from,
                            SetRightRequest request)
                     throws AccessException
Overrides this DestinationImpl method; AdminTopics do not accept SetRightRequest notifications.

Overrides:
setRightRequest in class DestinationImpl
Throws:
AccessException - Not thrown.

setDMQRequest

public void setDMQRequest(fr.dyade.aaa.agent.AgentId from,
                          SetDMQRequest request)
                   throws AccessException
Overrides this DestinationImpl method; AdminTopics do not accept SetDMQRequest notifications.

Overrides:
setDMQRequest in class DestinationImpl
Throws:
AccessException - Not thrown.

requestGroupNot

public void requestGroupNot(fr.dyade.aaa.agent.AgentId from,
                            RequestGroupNot not)
Overrides:
requestGroupNot in class DestinationImpl

preProcess

public SetRightRequest preProcess(SetRightRequest req)
Overrides:
preProcess in class DestinationImpl

postProcess

public void postProcess(SetRightRequest req)
Overrides:
postProcess in class DestinationImpl

preProcess

public ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from,
                                 ClientMessages msgs)
Overrides this DestinationImpl method; ClientMessages notifications hold requests sent by an administrator.

Overrides:
preProcess in class DestinationImpl

deleteNot

public void deleteNot(fr.dyade.aaa.agent.AgentId from,
                      fr.dyade.aaa.agent.DeleteNot not)
Overrides this DestinationImpl method; deletion requests are not accepted by AdminTopics.

Overrides:
deleteNot in class DestinationImpl

clusterRequest

public void clusterRequest(fr.dyade.aaa.agent.AgentId from,
                           ClusterRequest request)
                    throws AccessException
Overrides this TopicImpl method; AdminTopics do not accept ClusterRequest notifications.

Overrides:
clusterRequest in class TopicImpl
Throws:
AccessException - Not thrown.

clusterTest

public void clusterTest(fr.dyade.aaa.agent.AgentId from,
                        org.objectweb.joram.mom.dest.ClusterTest request)
Overrides this TopicImpl method; AdminTopics do not accept to join clusters other than their admin topics cluster.

Overrides:
clusterTest in class TopicImpl

clusterAck

public void clusterAck(fr.dyade.aaa.agent.AgentId from,
                       org.objectweb.joram.mom.dest.ClusterAck ack)
Overrides this TopicImpl method; a ClusterAck is not expected by an AdminTopic.

Overrides:
clusterAck in class TopicImpl

clusterNot

public void clusterNot(fr.dyade.aaa.agent.AgentId from,
                       org.objectweb.joram.mom.dest.ClusterNot not)
Overrides this TopicImpl method; if this AdminTopic is on server0, new cluster fellow is notified to other fellows and other fellows are notified to it.

Overrides:
clusterNot in class TopicImpl

unclusterRequest

public void unclusterRequest(fr.dyade.aaa.agent.AgentId from,
                             UnclusterRequest request)
                      throws MomException
Overrides this TopicImpl method; AdminTopics do not accept UnclusterRequest notifications.

Overrides:
unclusterRequest in class TopicImpl
Throws:
AccessException - Not thrown.
MomException

setFatherRequest

public void setFatherRequest(fr.dyade.aaa.agent.AgentId from,
                             SetFatherRequest request)
                      throws MomException
Overrides this TopicImpl method; AdminTopics do not accept SetFatherRequest notifications.

Overrides:
setFatherRequest in class TopicImpl
Throws:
AccessException - Not thrown.
MomException

fatherTest

public void fatherTest(fr.dyade.aaa.agent.AgentId from,
                       org.objectweb.joram.mom.dest.FatherTest not)
Overrides this TopicImpl method; AdminTopics do not accept to join a hierarchy.

Overrides:
fatherTest in class TopicImpl

fatherAck

public void fatherAck(fr.dyade.aaa.agent.AgentId from,
                      org.objectweb.joram.mom.dest.FatherAck ack)
Overrides this TopicImpl method; a FatherAck acknowledges the process of creating a hierarchy of topics.

Overrides:
fatherAck in class TopicImpl

unsetFatherRequest

public void unsetFatherRequest(fr.dyade.aaa.agent.AgentId from,
                               UnsetFatherRequest request)
                        throws MomException
Overrides this TopicImpl method; AdminTopics do not accept UnsetFatherRequest notifications.

Overrides:
unsetFatherRequest in class TopicImpl
Throws:
AccessException - Not thrown.
MomException

topicForwardNot

public void topicForwardNot(fr.dyade.aaa.agent.AgentId from,
                            TopicForwardNot not)
Overrides this TopicImpl method; the forwarded messages contain admin requests and will be processed.

Overrides:
topicForwardNot in class TopicImpl

doUnknownAgent

protected void doUnknownAgent(fr.dyade.aaa.agent.UnknownAgent uA)
Specializes this TopicImpl reaction.

Overrides:
doUnknownAgent in class TopicImpl

createDestination

public AdminTopicImpl.DestinationDesc createDestination(java.lang.String destName,
                                                        fr.dyade.aaa.agent.AgentId adminId,
                                                        java.util.Properties properties,
                                                        byte type,
                                                        java.lang.String className,
                                                        java.lang.String requestClassName,
                                                        java.lang.StringBuffer strbuf)
                                                 throws fr.dyade.aaa.agent.UnknownServerException,
                                                        RequestException
Instantiating the destination class or retrieving the destination.

Parameters:
destName - destination Name
adminId - other admin (null for TopicAdmin)
properties - destination properties
type - destination type ("queue" or "topic")
className - creates an instance of the class
requestClassName -
strbuf - information
Returns:
DestinationDesc contain destination description
Throws:
fr.dyade.aaa.agent.UnknownServerException
RequestException

doProcess

public void doProcess(CreateUserRequest request,
                      fr.dyade.aaa.agent.AgentId replyTo,
                      java.lang.String msgId)
               throws fr.dyade.aaa.agent.UnknownServerException,
                      RequestException
Processes a CreateUserRequest instance requesting the creation of a UserAgent for a given user.

Throws:
fr.dyade.aaa.agent.UnknownServerException - If the target server does not exist.
RequestException - If the user already exists but with a different password, or if the proxy deployment failed.

doProcess

public void doProcess(SetRight request,
                      fr.dyade.aaa.agent.AgentId replyTo,
                      java.lang.String msgId)
               throws fr.dyade.aaa.agent.UnknownServerException
Processes a SetRight instance requesting to grant a user a given right on a given destination.

Throws:
fr.dyade.aaa.agent.UnknownServerException

setRightAndSave

public static void setRightAndSave(SetRight request,
                                   fr.dyade.aaa.agent.AgentId replyTo,
                                   java.lang.String msgId)
                            throws fr.dyade.aaa.agent.UnknownServerException,
                                   java.io.IOException
Processes a SetRight instance requesting to grant a user a given right on a given destination. And save Agent TopicAdmin. (used by ScalAgent mediation)

Parameters:
request -
replyTo -
msgId -
Throws:
fr.dyade.aaa.agent.UnknownServerException
java.io.IOException

CreateUserAndSave

public static void CreateUserAndSave(CreateUserRequest request,
                                     fr.dyade.aaa.agent.AgentId replyTo,
                                     java.lang.String msgId)
                              throws fr.dyade.aaa.agent.UnknownServerException,
                                     RequestException,
                                     java.io.IOException
Deprecated. 

Processes a CreateUserRequest instance requesting the creation of a UserAgent for a given user and save Agent AdminTopic. (used by ScalAgent mediation)

Throws:
fr.dyade.aaa.agent.UnknownServerException - If the target server does not exist.
RequestException - If the user already exists but with a different password, or if the proxy deployment failed.
java.io.IOException - transaction exception

createDestinationAndSave

public static AdminTopicImpl.DestinationDesc createDestinationAndSave(java.lang.String destName,
                                                                      fr.dyade.aaa.agent.AgentId adminId,
                                                                      java.util.Properties properties,
                                                                      byte type,
                                                                      java.lang.String className,
                                                                      java.lang.String requestClassName,
                                                                      java.lang.StringBuffer strbuf)
                                                               throws fr.dyade.aaa.agent.UnknownServerException,
                                                                      RequestException,
                                                                      java.io.IOException
Deprecated. 

Instantiating the destination class or retrieving the destination and save Agent AdminTopic. (used by ScalAgent mediation)

Parameters:
destName - destination Name
adminId - other admin (null for TopicAdmin)
properties - destination properties
type - destination type ("queue" or "topic")
className - creates an instance of the class
requestClassName -
strbuf - information
Returns:
DestinationDesc contain destination description
Throws:
fr.dyade.aaa.agent.UnknownServerException
RequestException
java.io.IOException - transaction exception.

isDestinationTableContain

public static boolean isDestinationTableContain(java.lang.String destName)
Deprecated. 

is destinationTable contain destName ? (used by ScalAgent mediation)

Parameters:
destName - destination name.
Returns:
true if contain.

Joram 5.3.0

Copyright © 2000 - 2009 Scalagent D.T. - All rights reserved