Atavism Version 2018.1AGIS API

atavism.server.plugins
Class FlashPolicyPlugin

java.lang.Object
  extended by atavism.server.engine.EnginePlugin
      extended by atavism.server.plugins.FlashPolicyPlugin
All Implemented Interfaces:
MessageCallback, StatusMapCallback, TcpAcceptCallback

public class FlashPolicyPlugin
extends EnginePlugin
implements MessageCallback, TcpAcceptCallback

The FlashPolicy plugin serves up the flash policy file to the client.


Nested Class Summary
protected  class FlashPolicyPlugin.FlashPolicyJMX
           
static interface FlashPolicyPlugin.FlashPolicyJMXMBean
           
 
Nested classes/interfaces inherited from class atavism.server.engine.EnginePlugin
EnginePlugin.DeleteHook, EnginePlugin.DeleteSubObjHook, EnginePlugin.GenerateSubObjectHook, EnginePlugin.GetPropertyMessage, EnginePlugin.GetPropertyNamesMessage, EnginePlugin.LoadHook, EnginePlugin.LoadSubObjHook, EnginePlugin.PluginActivateHook, EnginePlugin.PluginStateMessage, EnginePlugin.SaveHook, EnginePlugin.SaveSubObjHook, EnginePlugin.SetPropertyMessage, EnginePlugin.SubObjData, EnginePlugin.TransferFilter, EnginePlugin.TransferObjectMessage, EnginePlugin.UnloadHook, EnginePlugin.UnloadSubObjHook
 
Field Summary
protected  java.lang.String DEFAULT_POLICY
           
protected  int DEFAULT_PORT
           
static int idleTimeout
          Player idle timeout in seconds.
protected static Logger log
           
protected  java.lang.String policy
           
protected  java.lang.String POLICY_REQUEST_STRING
           
protected  java.nio.ByteBuffer policyBuffer
           
protected  int port
           
protected  TcpServer tcpServer
           
 
Fields inherited from class atavism.server.engine.EnginePlugin
deleteSubObjectSubscription, dumpAllThreadSubscription, dumpAllThreadSubscriptionLock, loadSubObjectSubscription, lock, MSG_TYPE_DUMP_ALL_THREAD_STACKS, MSG_TYPE_GET_PROPERTY, MSG_TYPE_GET_PROPERTY_NAMES, MSG_TYPE_PLUGIN_STATE, MSG_TYPE_SET_PROPERTY, MSG_TYPE_SET_PROPERTY_NONBLOCK, MSG_TYPE_TRANSFER_OBJECT, pluginStateSubscription, propertySubscription, saveSubObjectSubscription, selectionFilter, selectionSubscription, setSubObjectPersistenceSubscription, subObjectSubscription, unloadSubObjectSubscription
 
Fields inherited from interface atavism.msgsys.MessageCallback
NO_FLAGS, RESPONSE_EXPECTED
 
Constructor Summary
FlashPolicyPlugin()
          The FlashPolicyPlugin constructor tells the underlying engine that it is, in fact, the flash policy plugin.
 
Method Summary
protected  java.lang.Object createMBeanInstance()
          Return JMX MBean instance object.
 void onActivate()
          onActivate() is the real startup method.
 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 atavism.server.engine.EnginePlugin
activate, createSubscription, getHookManager, getMessageHandler, getName, getObjectLockManager, getObjectProperties, getObjectProperties, getObjectProperty, getObjectPropertyNames, getPercentCPULoad, getPluginAvailable, getPluginInfo, getPluginNamespaces, getPluginState, getPluginStatus, getPluginType, getPropertyImpl, getPropertyNamesImpl, getStatusMap, handleMessage, handleMessageImpl, logDepsOutstanding, processKeysAndValues, registerActivateHook, registerDeleteHook, registerLoadHook, registerPluginNamespace, registerPluginNamespaces, registerPluginNamespaces, registerPluginNamespaces, registerSaveHook, registerTransferHook, registerUnloadHook, sendSubObjectResponse, sendSubObjectResponse, sendSubObjectResponse, setMessageHandler, setName, setObjectProperties, setObjectProperties, setObjectProperties, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectProperty, setObjectPropertyNoResponse, setPercentCPULoad, setPluginAvailable, setPluginInfo, setPluginType, setPropertyImpl, transferObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface atavism.msgsys.MessageCallback
handleMessage
 

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

log

protected static final Logger log

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

FlashPolicyPlugin

public FlashPolicyPlugin()
The FlashPolicyPlugin constructor tells the underlying engine that it is, in fact, the flash policy plugin. All the real startup action happens in the onActivate method.

See Also:
onActivate()
Method Detail

onActivate

public void onActivate()
onActivate() is the real startup method. It:
  • Calls registerHooks to enumerate the proxy's message processing hooks.
  • Creates and opens the TCP listener using the flash policy listen port.
  • Overrides:
    onActivate in class EnginePlugin
    See Also:
    registerHooks(), EventCallback#doWork

    createMBeanInstance

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

    Overrides:
    createMBeanInstance in class EnginePlugin

    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.