Package fr.dyade.aaa.agent
Class UDPNetwork.MessageBuilder
- java.lang.Object
-
- fr.dyade.aaa.common.Daemon
-
- fr.dyade.aaa.agent.UDPNetwork.MessageBuilder
-
- All Implemented Interfaces:
Runnable
- Enclosing class:
- UDPNetwork
final class UDPNetwork.MessageBuilder extends Daemon
Class used to transform UDP packets into a stream, to build the messages.
-
-
Field Summary
Fields Modifier and Type Field Description private UDPNetwork.NetworkInputStreampipeInprivate OutputStreampipeOutprivate UDPNetwork.ServerInfoservInfo
-
Constructor Summary
Constructors Constructor Description MessageBuilder(UDPNetwork.ServerInfo info, Logger logmon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()Releases any resources attached to this daemon.voidfeed(DatagramPacket packet)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
-
servInfo
private UDPNetwork.ServerInfo servInfo
-
pipeIn
private UDPNetwork.NetworkInputStream pipeIn
-
pipeOut
private OutputStream pipeOut
-
-
Constructor Detail
-
MessageBuilder
public MessageBuilder(UDPNetwork.ServerInfo info, Logger logmon) throws IOException
- Throws:
IOException
-
-
Method Detail
-
feed
public void feed(DatagramPacket packet) throws IOException
- Throws:
IOException
-
run
public void run()
-
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.
-
-