fr.dyade.aaa.agent
Class SimpleNetwork

java.lang.Object
  extended by fr.dyade.aaa.agent.Network
      extended by fr.dyade.aaa.agent.StreamNetwork
          extended by fr.dyade.aaa.agent.SimpleNetwork
All Implemented Interfaces:
MessageConsumer, NetworkMBean

public class SimpleNetwork
extends StreamNetwork

SimpleNetwork is a simple implementation of StreamNetwork class with a single connection at a time.


Nested Class Summary
(package private)  class SimpleNetwork.NetServerIn
           
(package private)  class SimpleNetwork.NetServerOut
           
(package private)  class SimpleNetwork.NetworkInputStream
           
(package private)  class SimpleNetwork.NetworkOutputStream
           
 
Nested classes/interfaces inherited from class fr.dyade.aaa.agent.Network
Network.NetworkAverageLoadTask
 
Field Summary
private  JGroups jgroups
           
(package private)  SimpleNetwork.NetServerIn netServerIn
          Input component
(package private)  SimpleNetwork.NetServerOut netServerOut
          Output component
(package private)  MessageSoftList sendList
          FIFO 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, DELIVER, domain, idxLS, logmon, name, nbMessageIn, nbMessageOut, port, qout, servers, serversFN, sid, WDActivationPeriod, WDNbRetryLevel1, WDNbRetryLevel2, WDRetryPeriod1, WDRetryPeriod2, WDRetryPeriod3
 
Constructor Summary
SimpleNetwork()
          Creates a new network component.
 
Method Summary
(package private)  void ackMsg(JGroupsAckMsg ack)
           
 boolean isRunning()
          Tests if the network component is alive.
 void setJGroups(JGroups jgroups)
           
 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.
 
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, delete, deliver, delServer, getAverageLoad1, getAverageLoad15, getAverageLoad5, getBootTS, getDomainName, getName, getNbMessageReceived, getNbMessageSent, getNbWaitingMessages, getPort, getQueue, getStamp, getWDActivationPeriod, getWDNbRetryLevel1, getWDNbRetryLevel2, getWDRetryPeriod1, getWDRetryPeriod2, getWDRetryPeriod3, index, insert, post, resetServer, restore, save, setPort, setStamp, setWDActivationPeriod, setWDNbRetryLevel1, setWDNbRetryLevel2, setWDRetryPeriod1, setWDRetryPeriod2, setWDRetryPeriod3, testBootTS, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sendList

MessageSoftList sendList
FIFO list of all messages to be sent by the watch-dog thread.


jgroups

private JGroups jgroups

netServerIn

SimpleNetwork.NetServerIn netServerIn
Input component


netServerOut

SimpleNetwork.NetServerOut netServerOut
Output component

Constructor Detail

SimpleNetwork

public SimpleNetwork()
Creates a new network component.

Method Detail

setJGroups

public void setJGroups(JGroups jgroups)

ackMsg

void ackMsg(JGroupsAckMsg ack)

start

public void start()
           throws java.io.IOException
Causes this network component to begin execution.

Throws:
java.io.IOException
See Also:
stop

stop

public void stop()
Forces the network component to stop executing.

See Also:
start

isRunning

public boolean isRunning()
Tests if the network component is alive.

Returns:
true if this MessageConsumer is alive; false otherwise.

toString

public java.lang.String toString()
Returns a string representation of this consumer, including the daemon's name and status.

Specified by:
toString in interface NetworkMBean
Overrides:
toString in class Network
Returns:
A string representation of this consumer.


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.