org.objectweb.joram.mom.dest

Class AdminTopicImpl

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

READ, READWRITE, WRITE, adminId, clients, destId, dmqId, freeReading, freeWriting

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, DeleteNot not)
Overrides this DestinationImpl method; deletion requests are not accepted by AdminTopics.
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, 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, 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, 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, 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, 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, ClientMessages not)
Overrides this DestinationImpl method; ClientMessages notifications hold requests sent by an administrator.
protected void
doReact(AgentId from, ClusterRequest request)
Overrides this TopicImpl method; AdminTopics do not accept ClusterRequest notifications.
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, 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(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(GetProxyIdListNot not)
protected void
doReact(GetProxyIdNot not)
AgentId
getId()
Method returning the id of the admin topic.
String
getName(AgentId proxyId)
Method used by proxies for retrieving their name.
String
getPassword(AgentId proxyId)
Method used by proxies for retrieving their password.
AgentId
getProxyId(String name, String pass)
Method used by ConnectionManager proxies to check their clients identification.
boolean
isTaken(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.
String
toString()

Methods inherited from class org.objectweb.joram.mom.dest.TopicImpl

doProcess, doProcess, doProcess, doProcess, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, forwardMessages, processMessages, react, specialProcess, toString

Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl

canBeDeleted, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, doReact, isAdministrator, isReader, isWriter, processSetRight, react, sendToDMQ, specialAdminProcess, specialProcess

Field Details

ref

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

Constructor Details

AdminTopicImpl

public AdminTopicImpl(AgentId topicId)
Constructs an AdminTopicImpl instance.

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

Method Details

doProcess

protected void doProcess(UnknownAgent uA)
Specializes this TopicImpl reaction.
Overrides:
doProcess in interface TopicImpl


doReact

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


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,
                       org.objectweb.joram.mom.dest.ClusterAck ack)
Overrides this TopicImpl method; a ClusterAck is not expected by an AdminTopic.
Overrides:
doReact in interface 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 interface TopicImpl


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 interface 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 interface TopicImpl


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 interface TopicImpl


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 interface TopicImpl


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(AgentId from,
                       ClientMessages not)
            throws AccessException
Overrides this DestinationImpl method; ClientMessages notifications hold requests sent by an administrator.
Overrides:
doReact in interface DestinationImpl

Throws:
AccessException - If the requester is not a WRITER on the AdminTopic.


doReact

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

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 interface DestinationImpl

Throws:
AccessException - Not thrown.


doReact

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


doReact

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

Throws:
AccessException - Not thrown.


doReact

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


doReact

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


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(GetProxyIdListNot not)


doReact

protected void doReact(GetProxyIdNot not)


getId

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


getName

public String getName(AgentId proxyId)
Method used by proxies for retrieving their name.


getPassword

public String getPassword(AgentId proxyId)
Method used by proxies for retrieving their password.


getProxyId

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

See Also:
ConnectionManager


isTaken

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


react

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

Throws:
UnknownNotificationException - If a received notification is unexpected by the AdminTopic.


toString

public String toString()
Overrides:
toString in interface TopicImpl


Copyright B) 2004 Scalagent - All rights reserved