org.softamis.net.multicast.listener
Class NetworkListener
java.lang.Object
org.softamis.net.multicast.listener.NetworkListener
- All Implemented Interfaces:
- MulticastListener
public class NetworkListener
- extends java.lang.Object
- implements MulticastListener
Implementation of simple communication protocol based on UDP multicast
- Author:
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fResponcesCount
protected int fResponcesCount
INITIAL_REQUESTS
public static final int INITIAL_REQUESTS
- See Also:
- Constant Field Values
fResponces
protected java.util.Set fResponces
NetworkListener
public NetworkListener(NetworkPolicy aPolicy)
sendRequest
public void sendRequest(DefaultMulticaster aMulticaster)
getMaximumResponsesAllowed
protected int getMaximumResponsesAllowed()
getDataToCompare
protected java.lang.String getDataToCompare()
incrementResponseCount
protected void incrementResponseCount()
fireLimitExceeded
protected void fireLimitExceeded()
dataReceived
public void dataReceived(MulticastDataEvent aEvent)
- Specified by:
dataReceived
in interface MulticastListener
getDatagramSignature
protected java.lang.String getDatagramSignature()
processRequest
protected void processRequest(Datagram aDatagram,
MulticastDataEvent anEvent)
processResponse
protected void processResponse(Datagram aDatagram,
MulticastDataEvent anEvent)
sendData
protected void sendData(Datagram aDatagram,
DefaultMulticaster aMulticaster)
getOwnAddress
protected java.lang.String getOwnAddress(Multicaster aMulticaster)
getLocalHost
public java.lang.String getLocalHost()