|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Thread
zeus.actors.Server
This component is part of the MailBox, and is responsible for
reading incoming messages. This component operates within its own thread
enabling the MailBox to send and receive multiple messages simultaneously.
It is unlikely that developers will need to call these methods directly. Although if the user wants to replace the default TCP/IP messaging mechanism this could be cleanly achieved by reimplementing the methods of this class.
| Field Summary | |
protected Address |
address
|
protected int |
connection_count
|
private AgentContext |
context
|
static int |
DEFAULT_PORT_MAX
|
static int |
DEFAULT_PORT_MIN
|
protected Queue |
inMail
Data structure holding messages as they are read in |
protected java.net.ServerSocket |
listenSocket
|
static int |
MAX_CONNECTIONS
|
static int |
MAX_QUEUE_LENGTH
|
protected MailBox |
mbox
Reference to MailBox of which this is a sub-component |
protected MsgHandler |
msgHandler
|
protected boolean |
processing
|
protected long |
timeout
timeout was originally private, but subclasses need to use it to construct there own treads of control, so I changed it to protected (ST -14/8/00) |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Server()
|
|
Server(AgentContext context,
MailBox mbox,
Queue inMail)
|
|
| Method Summary | |
void |
debug(java.lang.String str)
|
protected void |
finalize()
|
Address |
getAddress()
|
AgentContext |
getAgentContext()
|
java.lang.String |
getResponseAddress()
implement in haste, repent at leisure |
void |
lowerStatus()
|
void |
newMsg(Performative msg)
ensures that messages are processed // synchronized |
void |
normalStatus()
|
void |
run()
|
void |
stopProcessing()
|
void |
updateCount(int x)
|
| 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 static final int MAX_CONNECTIONS
public static final int MAX_QUEUE_LENGTH
public static final int DEFAULT_PORT_MIN
public static final int DEFAULT_PORT_MAX
protected java.net.ServerSocket listenSocket
protected Address address
protected int connection_count
protected boolean processing
private AgentContext context
protected long timeout
protected Queue inMail
protected MailBox mbox
protected MsgHandler msgHandler
| Constructor Detail |
public Server()
public Server(AgentContext context,
MailBox mbox,
Queue inMail)
| Method Detail |
public AgentContext getAgentContext()
public void updateCount(int x)
public void stopProcessing()
public void lowerStatus()
public void normalStatus()
public void run()
run in interface java.lang.Runnableprotected void finalize()
public Address getAddress()
public void newMsg(Performative msg)
public java.lang.String getResponseAddress()
getResponseAddress in interface InTraypublic void debug(java.lang.String str)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||