Package fr.dyade.aaa.agent
Class UDPNetwork.NetServerIn
- java.lang.Object
-
- fr.dyade.aaa.common.Daemon
-
- fr.dyade.aaa.agent.UDPNetwork.NetServerIn
-
- All Implemented Interfaces:
Runnable
- Enclosing class:
- UDPNetwork
final class UDPNetwork.NetServerIn extends Daemon
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNetServerIn(String name, Logger logmon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcleanServerInfo(UDPNetwork.ServerInfo srvInfo, int bootstamp)Cleans a server information about packets.protected voidclose()Releases any resources attached to this daemon.voidrun()protected voidshutdown()Interrupts a thread that waits for long periods.-
Methods inherited from class fr.dyade.aaa.common.Daemon
finish, getName, interrupt, isCurrentThread, isRunning, setDaemon, setName, setPriority, setThreadGroup, start, stop, toString
-
-
-
-
Field Detail
-
buf
final byte[] buf
-
packet
final DatagramPacket packet
-
-
Constructor Detail
-
NetServerIn
protected NetServerIn(String name, Logger logmon) throws IOException
- Throws:
IOException
-
-
Method Detail
-
close
protected void close()
Description copied from class:DaemonReleases any resources attached to this daemon. Be careful, its method should be called more than one time.
-
shutdown
protected void shutdown()
Description copied from class:DaemonInterrupts a thread that waits for long periods. In some cases, we must use application specific tricks. For example, if a thread is waiting on a known socket, we have to close the socket to cause the thread to return immediately. Unfortunately, there really isn't any technique that works in general.
-
run
public void run()
-
cleanServerInfo
private void cleanServerInfo(UDPNetwork.ServerInfo srvInfo, int bootstamp) throws IOException, Exception
Cleans a server information about packets. Restarts datagram packets numbering from beginning. Cleans expired messages.- Parameters:
srvInfo- the server information.bootstamp- the boot timestamp for the given server.- Throws:
IOException- an error occurs.Exception- an error occurs.
-
-