Class RegisteredWebHost
- java.lang.Object
-
- org.activecomponents.udp.holepunching.server.webcommands.RegisteredWebHost
-
- All Implemented Interfaces:
IRegisteredHost
public class RegisteredWebHost extends java.lang.Object implements IRegisteredHost
-
-
Field Summary
Fields Modifier and Type Field Description protected long
lastactivity
Timestamp of last activityprotected java.util.concurrent.BlockingQueue<java.lang.String>
msgqueue
-
Constructor Summary
Constructors Constructor Description RegisteredWebHost()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLastActivity()
Gets the last activity.java.lang.String
readMsg(long timeout)
void
setLastActivity(long lastactivity)
Sets the last activity.void
writeMsg(java.lang.String msg)
Writes a message to the connected host.
-
-
-
Method Detail
-
writeMsg
public void writeMsg(java.lang.String msg)
Writes a message to the connected host.- Specified by:
writeMsg
in interfaceIRegisteredHost
- Parameters:
msg
- The message.
-
readMsg
public java.lang.String readMsg(long timeout)
-
getLastActivity
public long getLastActivity()
Gets the last activity.- Returns:
- The last activity.
-
setLastActivity
public void setLastActivity(long lastactivity)
Sets the last activity.- Parameters:
lastactivity
- The last activity to set
-
-