public class SocketPolicyHandler extends java.lang.Object implements TcpAcceptCallback
Modifier and Type | Class and Description |
---|---|
protected class |
SocketPolicyHandler.SocketPolicyJMX |
static interface |
SocketPolicyHandler.SocketPolicyJMXMBean |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
DEFAULT_POLICY |
protected int |
DEFAULT_PORT |
static int |
idleTimeout
Player idle timeout in seconds.
|
protected java.lang.String |
policy |
protected java.lang.String |
POLICY_REQUEST_STRING |
protected java.nio.ByteBuffer |
policyBuffer |
protected int |
port |
protected TcpServer |
tcpServer |
Constructor and Description |
---|
SocketPolicyHandler(java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
createMBeanInstance()
Return JMX MBean instance object.
|
void |
onTcpAccept(java.nio.channels.SocketChannel sc)
Read a request from our connection, and if it is well-formed, send
the current policy.
|
protected void |
setPolicy(java.lang.String policy) |
protected final java.lang.String DEFAULT_POLICY
protected final int DEFAULT_PORT
protected final java.lang.String POLICY_REQUEST_STRING
protected TcpServer tcpServer
protected int port
protected java.lang.String policy
protected java.nio.ByteBuffer policyBuffer
public static int idleTimeout
protected java.lang.Object createMBeanInstance()
public void onTcpAccept(java.nio.channels.SocketChannel sc)
onTcpAccept
in interface TcpAcceptCallback
protected void setPolicy(java.lang.String policy)