org.objectweb.joram.mom.dest
Class AdminTopicImpl

java.lang.Object
  extended byorg.objectweb.joram.mom.dest.DestinationImpl
      extended byorg.objectweb.joram.mom.dest.TopicImpl
          extended byorg.objectweb.joram.mom.dest.AdminTopicImpl
All Implemented Interfaces:
java.io.Serializable

public class AdminTopicImpl
extends TopicImpl

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

See Also:
Serialized Form

Field Summary
static AdminTopicImpl ref
          Reference of the server's local AdminTopicImpl instance.
 
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
adminId, clients, destId, dmqId, freeReading, freeWriting, READ, READWRITE, WRITE
 
Constructor Summary
AdminTopicImpl(AgentId topicId)
          Constructs an AdminTopicImpl instance.
 
Method Summary
protected  void doProcess(UnknownAgent uA)
          Specializes this TopicImpl reaction.
protected  void doReact(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.
protected  void doReact(AgentId from, AdminReply not)
          Method implementing the reaction to a org.objectweb.joram.mom.notifications.AdminReply notification replying to an administration request.
protected  void doReact(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.
protected  void doReact(AgentId from, ClientMessages not)
          Overrides this DestinationImpl method; ClientMessages notifications hold requests sent by an administrator.
protected  void doReact(AgentId from, org.objectweb.joram.mom.dest.ClusterAck ack)
          Overrides this TopicImpl method; a ClusterAck is not expected by an AdminTopic.
protected  void doReact(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.
protected  void doReact(AgentId from, ClusterRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept ClusterRequest notifications.
protected  void doReact(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.
protected  void doReact(AgentId from, DeleteNot not)
          Overrides this DestinationImpl method; deletion requests are not accepted by AdminTopics.
protected  void doReact(AgentId from, org.objectweb.joram.mom.dest.FatherAck ack)
          Overrides this TopicImpl method; a FatherAck acknowledges the process of creating a hierarchy of topics.
protected  void doReact(AgentId from, org.objectweb.joram.mom.dest.FatherTest not)
          Overrides this TopicImpl method; AdminTopics do not accept to join a hierarchy.
protected  void doReact(AgentId from, SetDMQRequest request)
          Overrides this DestinationImpl method; AdminTopics do not accept SetDMQRequest notifications.
protected  void doReact(AgentId from, SetFatherRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept SetFatherRequest notifications.
protected  void doReact(AgentId from, SetRightRequest request)
          Overrides this DestinationImpl method; AdminTopics do not accept SetRightRequest notifications.
protected  void doReact(AgentId from, org.objectweb.joram.mom.dest.TopicForwardNot not)
          Overrides this TopicImpl method; the forwarded messages contain admin requests and will be processed.
protected  void doReact(AgentId from, UnclusterRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept UnclusterRequest notifications.
protected  void doReact(AgentId from, UnsetFatherRequest request)
          Overrides this TopicImpl method; AdminTopics do not accept UnsetFatherRequest notifications.
protected  void doReact(GetProxyIdListNot not)
           
protected  void doReact(GetProxyIdNot not)
           
 AgentId getId()
          Method returning the id of the admin topic.
 java.lang.String getName(AgentId proxyId)
          Method used by proxies for retrieving their name.
 java.lang.String getPassword(AgentId proxyId)
          Method used by proxies for retrieving their password.
 AgentId getProxyId(java.lang.String name, java.lang.String pass)
          Method used by ConnectionManager proxies to check their clients identification.
 boolean isTaken(java.lang.String name)
          Method used by proxies for checking if a given name is already used.
 void react(AgentId from, Notification not)
          Distributes the received notifications to the appropriate reactions.
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.joram.mom.dest.TopicImpl
doProcess, doProcess, doProcess, doReact, doReact, doReact, doReact, doReact, doReact, forwardMessages, processMessages, specialProcess
 
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl
canBeDeleted, doReact, doReact, doReact, doReact, doReact, doReact, isAdministrator, isReader, isWriter, processSetRight, sendToDMQ, specialAdminProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ref

public static AdminTopicImpl ref
Reference of the server's local AdminTopicImpl instance.

Constructor Detail

AdminTopicImpl

public AdminTopicImpl(AgentId topicId)
Constructs an AdminTopicImpl instance.

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

toString

public java.lang.String toString()
Overrides:
toString in class TopicImpl

getProxyId

public AgentId getProxyId(java.lang.String name,
                          java.lang.String pass)
                   throws java.lang.Exception
Method used by ConnectionManager proxies to check their clients identification.

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(AgentId proxyId)
Method used by proxies for retrieving their name.


getPassword

public java.lang.String getPassword(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.


getId

public AgentId getId()
Method returning the id of the admin topic.


react

public void react(AgentId from,
                  Notification not)
           throws UnknownNotificationException
Distributes the received notifications to the appropriate reactions.

Overrides:
react in class TopicImpl
Throws:
UnknownNotificationException - If a received notification is unexpected by the AdminTopic.

doReact

protected void doReact(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.


doReact

protected void doReact(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.


doReact

protected void doReact(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.


doReact

protected void doReact(GetProxyIdNot not)

doReact

protected void doReact(GetProxyIdListNot not)

doReact

protected void doReact(AgentId from,
                       SetRightRequest request)
                throws AccessException
Overrides this DestinationImpl method; AdminTopics do not accept SetRightRequest notifications.

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

doReact

protected void doReact(AgentId from,
                       SetDMQRequest request)
                throws AccessException
Overrides this DestinationImpl method; AdminTopics do not accept SetDMQRequest notifications.

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

doReact

protected void doReact(AgentId from,
                       ClientMessages not)
                throws AccessException
Overrides this DestinationImpl method; ClientMessages notifications hold requests sent by an administrator.

Overrides:
doReact in class DestinationImpl
Throws:
AccessException - If the requester is not a WRITER on the AdminTopic.

doReact

protected void doReact(AgentId from,
                       DeleteNot not)
Overrides this DestinationImpl method; deletion requests are not accepted by AdminTopics.

Overrides:
doReact in class DestinationImpl

doReact

protected void doReact(AgentId from,
                       ClusterRequest request)
                throws AccessException
Overrides this TopicImpl method; AdminTopics do not accept ClusterRequest notifications.

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

doReact

protected void doReact(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:
doReact in class TopicImpl

doReact

protected void doReact(AgentId from,
                       org.objectweb.joram.mom.dest.ClusterAck ack)
Overrides this TopicImpl method; a ClusterAck is not expected by an AdminTopic.

Overrides:
doReact in class TopicImpl

doReact

protected void doReact(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:
doReact in class TopicImpl

doReact

protected void doReact(AgentId from,
                       UnclusterRequest request)
                throws MomException
Overrides this TopicImpl method; AdminTopics do not accept UnclusterRequest notifications.

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

doReact

protected void doReact(AgentId from,
                       SetFatherRequest request)
                throws MomException
Overrides this TopicImpl method; AdminTopics do not accept SetFatherRequest notifications.

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

doReact

protected void doReact(AgentId from,
                       org.objectweb.joram.mom.dest.FatherTest not)
Overrides this TopicImpl method; AdminTopics do not accept to join a hierarchy.

Overrides:
doReact in class TopicImpl

doReact

protected void doReact(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:
doReact in class TopicImpl

doReact

protected void doReact(AgentId from,
                       UnsetFatherRequest request)
                throws MomException
Overrides this TopicImpl method; AdminTopics do not accept UnsetFatherRequest notifications.

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

doReact

protected void doReact(AgentId from,
                       org.objectweb.joram.mom.dest.TopicForwardNot not)
Overrides this TopicImpl method; the forwarded messages contain admin requests and will be processed.

Overrides:
doReact in class TopicImpl

doProcess

protected void doProcess(UnknownAgent uA)
Specializes this TopicImpl reaction.

Overrides:
doProcess in class TopicImpl


Copyright ? 2004 Scalagent - All rights reserved