|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.dyade.aaa.agent.Network
The Network abstract class provides ..
| Field Summary | |
protected java.lang.String |
bootTSFN
Filename for boot time stamp storage |
protected java.lang.String |
domain
The domain name. |
protected int |
idxLS
Index of local server in status and matrix arrays. |
protected org.objectweb.util.monolog.api.Logger |
logmon
|
protected java.lang.String |
name
The component's name as it appears in logging. |
protected int |
port
The communication port. |
protected fr.dyade.aaa.agent.MessageVector |
qout
The MessageVector associated with this network component. |
protected short[] |
servers
List of id. |
protected java.lang.String |
serversFN
Filename for servers storage |
protected short |
sid
Id. |
| Constructor Summary | |
Network()
Creates a new network component. |
|
| Method Summary | |
void |
delete()
This operation always throws an IllegalStateException. |
protected void |
deliver(fr.dyade.aaa.agent.Message msg)
Try to deliver the received message to the right consumer. |
java.lang.String |
getDomainName()
Returns the corresponding domain's name. |
java.lang.String |
getName()
Returns this session's name. |
int |
getPort()
|
fr.dyade.aaa.agent.MessageQueue |
getQueue()
Get this consumer's MessageQueue. |
protected int |
index(short id)
Returns the index in internal table of the specified server. |
void |
init(java.lang.String name,
int port,
short[] servers)
Initializes a new network component. |
void |
insert(fr.dyade.aaa.agent.Message msg)
Insert a message in the MessageQueue. |
void |
post(fr.dyade.aaa.agent.Message msg)
Adds a message in "ready to deliver" list. |
void |
restore()
Restores component's information from persistent storage. |
void |
save()
Saves information to persistent storage. |
void |
setPort(int port)
Updates the network port. |
java.lang.String |
toString()
Returns a string representation of this consumer. |
void |
validate()
Validates all messages pushed in queue during transaction session. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface fr.dyade.aaa.agent.MessageConsumer |
isRunning, start, stop |
| Methods inherited from interface fr.dyade.aaa.agent.NetworkMBean |
isRunning, start, stop |
| Field Detail |
protected org.objectweb.util.monolog.api.Logger logmon
protected short sid
protected int idxLS
protected short[] servers
protected transient java.lang.String serversFN
protected transient java.lang.String bootTSFN
protected java.lang.String name
protected java.lang.String domain
protected int port
protected fr.dyade.aaa.agent.MessageVector qout
MessageVector associated with this network component.
| Constructor Detail |
public Network()
Class.newInstance() method during configuration.
The configuration of component is then done by init method.
| Method Detail |
public final java.lang.String getName()
getName in interface MessageConsumerpublic final java.lang.String getDomainName()
getDomainName in interface MessageConsumerpublic java.lang.String toString()
public void insert(fr.dyade.aaa.agent.Message msg)
MessageQueue.
This method is used during initialisation to restore the component
state from persistent storage.
insert in interface MessageConsumermsg - the message
public void save()
throws java.io.IOException
save in interface MessageConsumerjava.io.IOException
public void restore()
throws java.lang.Exception
restore in interface MessageConsumerjava.lang.Exception
public void init(java.lang.String name,
int port,
short[] servers)
throws java.lang.Exception
Class.newInstance() method for create
(whitout any parameter) the component, then we can initialize it with
this method.
name - The domain name.port - The listen port.servers - The list of servers directly accessible from this
network interface.
java.lang.Exception
public void post(fr.dyade.aaa.agent.Message msg)
throws java.lang.Exception
post in interface MessageConsumerjava.lang.Exceptionprotected final int index(short id)
id - the unique server id.
protected void deliver(fr.dyade.aaa.agent.Message msg)
throws java.lang.Exception
msg - the message.
java.lang.Exceptionpublic void validate()
validate in interface MessageConsumerpublic fr.dyade.aaa.agent.MessageQueue getQueue()
MessageConsumerMessageQueue. Use in administration and
debug tasks, should be replaced by a common attribute.
getQueue in interface MessageConsumerMessageConsumer's queue.
public void delete()
throws java.lang.IllegalStateException
delete in interface MessageConsumerjava.lang.IllegalStateExceptionTransactionpublic void setPort(int port)
public final int getPort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||