Atavism Version 2018.1AGIS API

atavism.server.engine
Class SocketPolicyHandler

java.lang.Object
  extended by atavism.server.engine.SocketPolicyHandler
All Implemented Interfaces:
TcpAcceptCallback

public class SocketPolicyHandler
extends java.lang.Object
implements TcpAcceptCallback

The SocketPolicyHandler serves up the socket policy file to the client.


Nested Class Summary
protected  class SocketPolicyHandler.SocketPolicyJMX
           
static interface SocketPolicyHandler.SocketPolicyJMXMBean
           
 
Field Summary
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 Summary
SocketPolicyHandler(java.util.Properties properties)
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_POLICY

protected final java.lang.String DEFAULT_POLICY
See Also:
Constant Field Values

DEFAULT_PORT

protected final int DEFAULT_PORT
See Also:
Constant Field Values

POLICY_REQUEST_STRING

protected final java.lang.String POLICY_REQUEST_STRING
See Also:
Constant Field Values

tcpServer

protected TcpServer tcpServer

port

protected int port

policy

protected java.lang.String policy

policyBuffer

protected java.nio.ByteBuffer policyBuffer

idleTimeout

public static int idleTimeout
Player idle timeout in seconds. If there has been no activity from the client, then the connection is closed.

Constructor Detail

SocketPolicyHandler

public SocketPolicyHandler(java.util.Properties properties)
Method Detail

createMBeanInstance

protected java.lang.Object createMBeanInstance()
Return JMX MBean instance object. Over-ride to provide your own MBean implementation.


onTcpAccept

public void onTcpAccept(java.nio.channels.SocketChannel sc)
Read a request from our connection, and if it is well-formed, send the current policy.

Specified by:
onTcpAccept in interface TcpAcceptCallback

setPolicy

protected void setPolicy(java.lang.String policy)


Copyright © 2018 Dragonsan Studios Sp. z o.o.