Package fr.dyade.aaa.agent
Class SimpleNetwork
- java.lang.Object
-
- fr.dyade.aaa.agent.Network
-
- fr.dyade.aaa.agent.StreamNetwork
-
- fr.dyade.aaa.agent.SimpleNetwork
-
- All Implemented Interfaces:
MessageComparator,MessageConsumer,NetworkMBean
public class SimpleNetwork extends StreamNetwork
SimpleNetworkis a simple implementation ofStreamNetworkclass with a single connection at a time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classSimpleNetwork.NetServerIn(package private) classSimpleNetwork.NetServerOut(package private) classSimpleNetwork.NetworkInputStream(package private) classSimpleNetwork.NetworkOutputStream-
Nested classes/interfaces inherited from class fr.dyade.aaa.agent.Network
Network.NetworkAverageLoadTask
-
-
Field Summary
Fields Modifier and Type Field Description (package private) SimpleNetwork.NetServerInnetServerInInput component(package private) SimpleNetwork.NetServerOutnetServerOutOutput component(package private) MessageSoftListsendListFIFO list of all messages to be sent by the watch-dog thread.-
Fields inherited from class fr.dyade.aaa.agent.StreamNetwork
backlog, CnxRetry, ConnectTimeout, inLocalAddr, outLocalAddr, outLocalPort, serverSocketFactory, socketFactory, SoLinger, SoTimeout, TcpNoDelay
-
Fields inherited from class fr.dyade.aaa.agent.Network
ALREADY_DELIVERED, averageLoadTask, bootTSFN, DEBUG, DELIVER, domain, idxLS, logger, name, nbMessageIn, nbMessageOut, port, qout, servers, serversFN, sid, WDActivationPeriod, WDNbRetryLevel1, WDNbRetryLevel2, WDRetryPeriod1, WDRetryPeriod2, WDRetryPeriod3
-
-
Constructor Summary
Constructors Constructor Description SimpleNetwork()Creates a new network component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRunning()Tests if the network component is alive.voidstart()Causes this network component to begin execution.voidstop()Forces the network component to stop executing.StringtoString()Returns a string representation of this consumer, including the daemon's name and status.-
Methods inherited from class fr.dyade.aaa.agent.StreamNetwork
createServerSocket, createServerSocket, createSocket, createSocket, createSocket, init, setProperties, setSocketOption
-
Methods inherited from class fr.dyade.aaa.agent.Network
addServer, channelPostAndValidate, checkActive, delete, deleteMessage, deliver, delServer, getAverageLoad1, getAverageLoad15, getAverageLoad5, getBootTS, getDomainName, getMessageDest, getMessageSource, getName, getNbMessageReceived, getNbMessageSent, getNbWaitingMessages, getPort, getQueue, getStamp, getWDActivationPeriod, getWDNbRetryLevel1, getWDNbRetryLevel2, getWDRetryPeriod1, getWDRetryPeriod2, getWDRetryPeriod3, index, insert, isPrior, post, postAndValidate, postMessage, prepareMessage, prepareMessageWithoutStamp, resetServer, restore, save, saveChannel, setMessageSource, setPort, setStamp, setWDActivationPeriod, setWDNbRetryLevel1, setWDNbRetryLevel2, setWDRetryPeriod1, setWDRetryPeriod2, setWDRetryPeriod3, testBootTS, testRecvUpdate, validate, validateChannel
-
-
-
-
Field Detail
-
sendList
MessageSoftList sendList
FIFO list of all messages to be sent by the watch-dog thread.
-
netServerIn
SimpleNetwork.NetServerIn netServerIn
Input component
-
netServerOut
SimpleNetwork.NetServerOut netServerOut
Output component
-
-
Method Detail
-
start
public void start() throws IOExceptionCauses this network component to begin execution.- Throws:
IOException- See Also:
MessageConsumer.stop()
-
stop
public void stop()
Forces the network component to stop executing.- See Also:
MessageConsumer.start()
-
isRunning
public boolean isRunning()
Tests if the network component is alive.- Returns:
- true if this
MessageConsumeris alive; false otherwise.
-
toString
public String toString()
Returns a string representation of this consumer, including the daemon's name and status.- Specified by:
toStringin interfaceNetworkMBean- Overrides:
toStringin classNetwork- Returns:
- A string representation of this consumer.
-
-