|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Thread
zeus.actors.Server
zeus.actors.intrays.Zeus_ACC_Server
Zeus_ACC_Server uses the FIPA_97_Server and FIPA_2000_Server classes to provide a unified message reception and handleing service.On init this class will create a FIPA_97_Server and a FIPA_2000_Server, using itself as a parameter. When either of these intrays receives a message it will call back the appropiate handle method in this class. The message will then be processed and placed on the message handleing q in this instance. Finally this message will be handled and processed.
| Field Summary | |
protected AgentContext |
context
access to the context object is provided as protected as a convienience for API programmers and future extentions, it is passed to the init() of this class |
protected java.lang.String |
host
host is protected to allow for interference by putative sub-classes |
java.lang.String |
hostname
|
protected java.lang.String |
httpPort
httpPort is the number of the port that the FIPA_2000 HTTP service will listenon. |
protected FIPA_2000_HTTP_Server |
httpServer
httpServer is the reference to the FIPA_2000_HTTP_Server that this class sets up and runs in it's init() |
protected java.lang.String |
iiop2000Port
iiop2000port is used to store the number of the port that the FIPA_2000 IIOP listening service (the server) will use. |
protected java.lang.String |
iiop97Port
iiop97port is used to store the number of the port that the FIPA_97 IIOP listening service (the server) will use. |
private Queue |
msgQ
|
protected java.lang.String |
name
name is set to "ACC" by default |
protected FIPA_97_Server |
ninetySeven_Server
ninetySeven_Server is the reference to the FIPA_97_Server that this class sets up and runs in it's init() |
private ZeusParser |
parser
|
protected FIPA_2000_IIOP_Server |
twoThousand_Server
twoThousand_Server is the reference to the FIPA_2000_IIOP_Server that this class sets up and runs in it's init(). |
| Fields inherited from class zeus.actors.Server |
address, connection_count, DEFAULT_PORT_MAX, DEFAULT_PORT_MIN, inMail, listenSocket, MAX_CONNECTIONS, MAX_QUEUE_LENGTH, mbox, msgHandler, processing, timeout |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Zeus_ACC_Server(AgentContext context,
Zeus_ACC_MailBox mbox)
class constructor that takes the AgentContext and registers this instance with it, and the MailBox and grabs the reference so that it can be used later. |
|
| Method Summary | |
void |
debug(java.lang.String str)
|
protected void |
finalize()
|
void |
forward(Performative perf)
forward is the method called when the MsgHandler fires a MessageRule that is setup by the setHandleMessage method. |
void |
forwardFIPAMessage(java.lang.String text)
for now the behaviour is :- get message, act surprised, then parse it into a FIPAPerformative, map that to a Performative, register self as alias in nameserver, add alias to FIPAAddressBook, stamp message with said alias, assert a messageHandleing rule to invoke forwarding behaviour when a response is received send message to Zeus agent, |
Address |
getAddress()
|
java.lang.String |
getResponseAddress()
return a string of addresses that this server is listening on |
void |
handle(FipaMessage aMessage)
handle (FIPA.FipaMessage aMessage) is called by the FIPA_2000_server that the init method of this class creates. |
void |
handle(java.lang.String message)
handle(String message) is called by the FIPA_97_Server which the init method of the Zeus_ACC_Server class creates it is used as an interface to unify and collate the information reception and processing for the ACC agent. |
java.lang.String |
pop()
pull something off the ACC message processing queue |
void |
push(java.lang.String target)
put something onto the ACC message processing queue |
void |
registerAgent(FIPA_AID_Address address,
java.lang.String name)
registerAgent is functionally identical to registerAlias, but is semantically slightly different because in the one we are using the agent name directly, while in the other we are trying to decouple |
protected void |
registerAlias(FIPA_AID_Address sender)
send a registration to the nameservers that we are using. |
protected void |
registerAlias(FIPA_AID_Address address,
java.lang.String name)
send a registration to the nameservers that we are using. |
protected void |
registerAlias(java.lang.String name)
send a registration to the nameservers that we are using. |
void |
run()
This is where the changes were needed. |
void |
setFIPAAlias(java.lang.String name,
FIPA_AID_Address fAddress)
provides a basic mechanism for getting aliases for agents on other platforms into the Zeus address space. |
void |
setFIPAAlias(java.lang.String name,
java.lang.String address)
provides a basic mechanism for getting aliases for agents on other platforms into the Zeus address space. |
private void |
setHandleMessage(FIPA_AID_Address faddress,
java.lang.String alias)
set up a forwarding rule, if one is not already present. |
void |
stopProcessing()
stopProcessing will cause the run loop of this class to stop |
| Methods inherited from class zeus.actors.Server |
getAgentContext, lowerStatus, newMsg, normalStatus, updateCount |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.lang.String hostname
protected java.lang.String iiop2000Port
protected java.lang.String iiop97Port
protected java.lang.String httpPort
protected AgentContext context
private Queue msgQ
private ZeusParser parser
protected java.lang.String name
protected FIPA_2000_IIOP_Server twoThousand_Server
protected FIPA_97_Server ninetySeven_Server
protected FIPA_2000_HTTP_Server httpServer
protected java.lang.String host
| Constructor Detail |
public Zeus_ACC_Server(AgentContext context,
Zeus_ACC_MailBox mbox)
| Method Detail |
public void stopProcessing()
stopProcessing in class Serverpublic void run()
run in interface java.lang.Runnablerun in class Serverpublic void forwardFIPAMessage(java.lang.String text)
private void setHandleMessage(FIPA_AID_Address faddress,
java.lang.String alias)
public void setFIPAAlias(java.lang.String name,
java.lang.String address)
public void setFIPAAlias(java.lang.String name,
FIPA_AID_Address fAddress)
public void forward(Performative perf)
protected void registerAlias(FIPA_AID_Address sender)
sender - is the name of the alias to use
protected void registerAlias(FIPA_AID_Address address,
java.lang.String name)
protected void registerAlias(java.lang.String name)
public void registerAgent(FIPA_AID_Address address,
java.lang.String name)
registerAgent in interface FIPA_2000_Handlerprotected void finalize()
finalize in class Serverpublic Address getAddress()
getAddress in class Serverpublic java.lang.String pop()
public void push(java.lang.String target)
public void handle(java.lang.String message)
implements the FIPA_97_Handler interface
handle in interface FIPA_97_Handlermessage - - the message picked up from the fipa_97 transportpublic void handle(FipaMessage aMessage)
ISSUES
------
Envelopes - what should we do???
handle in interface FIPA_2000_HandleraMessage - - the message in FIPA 2000 object (java/idl) formatFipaMessagepublic java.lang.String getResponseAddress()
getResponseAddress in interface InTraygetResponseAddress in class Serverpublic void debug(java.lang.String str)
debug in class Server
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||