|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.Network
public abstract class 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. for all servers in the domain, this list is sorted and is used as index for internal tables. |
protected java.lang.String |
serversFN
Filename for servers storage |
protected short |
sid
Id. of local server. |
Constructor Summary | |
---|---|
Network()
Creates a new network component. |
Method Summary | |
---|---|
void |
delete()
Deletes the component, removes all persistent datas. |
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 byte[] |
getStamp()
|
long |
getWDActivationPeriod()
Gets the WDActivationPeriod value. |
int |
getWDNbRetryLevel1()
Gets the WDNbRetryLevel1 value. |
int |
getWDNbRetryLevel2()
Gets the WDNbRetryLevel2 value. |
long |
getWDRetryPeriod1()
Gets the WDRetryPeriod1 value. |
long |
getWDRetryPeriod2()
Gets the WDRetryPeriod2 value. |
long |
getWDRetryPeriod3()
Gets the WDRetryPeriod3 value. |
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. |
protected void |
setStamp(byte[] stampbuf)
|
void |
setWDActivationPeriod(long WDActivationPeriod)
Sets the WDActivationPeriod value. |
void |
setWDNbRetryLevel1(int WDNbRetryLevel1)
Sets the WDNbRetryLevel1 value. |
void |
setWDNbRetryLevel2(int WDNbRetryLevel2)
Sets the WDNbRetryLevel2 value. |
void |
setWDRetryPeriod1(long WDRetryPeriod1)
Sets the WDRetryPeriod1 value. |
void |
setWDRetryPeriod2(long WDRetryPeriod2)
Sets the WDRetryPeriod2 value. |
void |
setWDRetryPeriod3(long WDRetryPeriod3)
Sets the WDRetryPeriod3 value. |
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 long getWDActivationPeriod()
getWDActivationPeriod
in interface NetworkMBean
public void setWDActivationPeriod(long WDActivationPeriod)
setWDActivationPeriod
in interface NetworkMBean
WDActivationPeriod
- the WDActivationPeriod valuepublic int getWDNbRetryLevel1()
getWDNbRetryLevel1
in interface NetworkMBean
public void setWDNbRetryLevel1(int WDNbRetryLevel1)
setWDNbRetryLevel1
in interface NetworkMBean
WDNbRetryLevel1
- the WDNbRetryLevel1 valuepublic long getWDRetryPeriod1()
getWDRetryPeriod1
in interface NetworkMBean
public void setWDRetryPeriod1(long WDRetryPeriod1)
setWDRetryPeriod1
in interface NetworkMBean
WDRetryPeriod1
- the WDRetryPeriod1 valuepublic int getWDNbRetryLevel2()
getWDNbRetryLevel2
in interface NetworkMBean
public void setWDNbRetryLevel2(int WDNbRetryLevel2)
setWDNbRetryLevel2
in interface NetworkMBean
WDNbRetryLevel2
- the WDNbRetryLevel2 valuepublic long getWDRetryPeriod2()
getWDRetryPeriod2
in interface NetworkMBean
public void setWDRetryPeriod2(long WDRetryPeriod2)
setWDRetryPeriod2
in interface NetworkMBean
WDRetryPeriod2
- the WDRetryPeriod2 valuepublic long getWDRetryPeriod3()
getWDRetryPeriod3
in interface NetworkMBean
public void setWDRetryPeriod3(long WDRetryPeriod3)
setWDRetryPeriod3
in interface NetworkMBean
WDRetryPeriod3
- the WDRetryPeriod3 valuepublic final java.lang.String getName()
getName
in interface MessageConsumer
getName
in interface NetworkMBean
public final java.lang.String getDomainName()
getDomainName
in interface MessageConsumer
public java.lang.String toString()
toString
in interface NetworkMBean
toString
in class java.lang.Object
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 MessageConsumer
msg
- the messagepublic void save() throws java.io.IOException
save
in interface MessageConsumer
java.io.IOException
public void restore() throws java.lang.Exception
restore
in interface MessageConsumer
java.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 MessageConsumer
java.lang.Exception
protected final int index(short id)
id
- the unique server id.protected final byte[] getStamp()
protected final void setStamp(byte[] stampbuf)
protected void deliver(fr.dyade.aaa.agent.Message msg) throws java.lang.Exception
msg
- the message.
java.lang.Exception
public void delete() throws java.lang.IllegalStateException
delete
in interface MessageConsumer
java.lang.IllegalStateException
Transaction
public void validate()
validate
in interface MessageConsumer
public fr.dyade.aaa.agent.MessageQueue getQueue()
MessageConsumer
MessageQueue
. Use in administration and
debug tasks, should be replaced by a common attribute.
getQueue
in interface MessageConsumer
MessageConsumer
's queue.public void setPort(int port)
public final int getPort()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |