|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.Network
fr.dyade.aaa.agent.StreamNetwork
fr.dyade.aaa.agent.PoolNetwork
public class PoolNetwork
PoolNetwork
is an implementation of StreamNetwork
class that manages multiple connection in a pool paradigm way.
Field Summary | |
---|---|
static byte[] |
magic
Magic number to identify peer. |
Fields inherited from class fr.dyade.aaa.agent.Network |
---|
bootTSFN, domain, idxLS, logmon, name, nbMessageIn, nbMessageOut, port, qout, servers, serversFN, sid |
Constructor Summary | |
---|---|
PoolNetwork()
Creates a new network component. |
Method Summary | |
---|---|
void |
addServer(short id)
Adds the server sid in the network configuration. |
void |
delServer(short id)
Removes the server sid in the network configuration. |
boolean |
getCompressedFlows()
Returns if the stream between servers are compressed or not. |
long |
getIdleTimeout()
Returns the maximum idle period permitted before reseting the connection. |
int |
getNbActiveSession()
Returns the number of currently connected sessions. |
int |
getNbMaxActiveSession()
Returns the maximum number of concurrent connected sessions. |
int |
getNbWaitingMessages()
Gets the number of waiting messages in this engine. |
void |
init(java.lang.String name,
int port,
short[] servers)
Initializes a new network component. |
boolean |
isRunning()
Tests if the network component is alive. |
void |
setIdleTimeout(long idleTimeout)
Sets the maximum idle period permitted before reseting the connection. |
void |
setProperties()
Set the properties of the network. |
void |
start()
Causes this network component to begin execution. |
void |
stop()
Forces the network component to stop executing. |
java.lang.String |
toString()
Returns a string representation of this consumer, including the daemon's name and status. |
void |
wakeup()
Wakes up the watch-dog thread. |
Methods inherited from class fr.dyade.aaa.agent.Network |
---|
delete, deliver, getAverageLoad1, getAverageLoad15, getAverageLoad5, getDomainName, getName, getNbMessageReceived, getNbMessageSent, getPort, getQueue, getStamp, getWDActivationPeriod, getWDNbRetryLevel1, getWDNbRetryLevel2, getWDRetryPeriod1, getWDRetryPeriod2, getWDRetryPeriod3, index, insert, post, restore, save, setPort, setStamp, setWDActivationPeriod, setWDNbRetryLevel1, setWDNbRetryLevel2, setWDRetryPeriod1, setWDRetryPeriod2, setWDRetryPeriod3, validate |
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.NetworkMBean |
---|
getAverageLoad1, getAverageLoad15, getAverageLoad5, getName, getNbMessageReceived, getNbMessageSent, getWDActivationPeriod, getWDNbRetryLevel1, getWDNbRetryLevel2, getWDRetryPeriod1, getWDRetryPeriod2, getWDRetryPeriod3, setWDActivationPeriod, setWDNbRetryLevel1, setWDNbRetryLevel2, setWDRetryPeriod1, setWDRetryPeriod2, setWDRetryPeriod3 |
Field Detail |
---|
public static final byte[] magic
Constructor Detail |
---|
public PoolNetwork() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public boolean getCompressedFlows()
getCompressedFlows
in interface PoolNetworkMBean
public int getNbMaxActiveSession()
getNbMaxActiveSession
in interface PoolNetworkMBean
public int getNbActiveSession()
getNbActiveSession
in interface PoolNetworkMBean
public long getIdleTimeout()
getIdleTimeout
in interface PoolNetworkMBean
public void setIdleTimeout(long idleTimeout)
setIdleTimeout
in interface PoolNetworkMBean
the
- maximum idle period permitted before reseting the connection.public void init(java.lang.String name, int port, short[] servers) throws java.lang.Exception
Class.newInstance()
method for create
(without any parameter) the component, then we can initialize it with
this method.
init
in class StreamNetwork
name
- The domain name.port
- The listen port.servers
- The list of servers directly accessible from this
network interface.
java.lang.Exception
Network
public void setProperties() throws java.lang.Exception
setProperties
in class StreamNetwork
java.lang.Exception
public void addServer(short id) throws java.lang.Exception
addServer
in class Network
id
- the unique server id.
java.lang.Exception
public void delServer(short id) throws java.lang.Exception
delServer
in class Network
id
- the unique server id.
java.lang.Exception
public void start() throws java.lang.Exception
start
in interface MessageConsumer
start
in interface NetworkMBean
java.lang.Exception
stop
public void wakeup()
public void stop()
stop
in interface MessageConsumer
stop
in interface NetworkMBean
start
public boolean isRunning()
isRunning
in interface MessageConsumer
isRunning
in interface NetworkMBean
MessageConsumer
is alive; false
otherwise.public int getNbWaitingMessages()
getNbWaitingMessages
in interface NetworkMBean
getNbWaitingMessages
in class Network
public java.lang.String toString()
toString
in interface NetworkMBean
toString
in class Network
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |