public class ModeratorPlugin extends EnginePlugin implements TcpAcceptCallback
Modifier and Type | Class and Description |
---|---|
static class |
ModeratorPlugin.GetModeratorResponseMessage
Message to return Moderator Data properties.
|
static class |
ModeratorPlugin.ModeratorMessage
Message to Request Moderator data using the given properties.
|
protected class |
ModeratorPlugin.SocketHandler |
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
Modifier and Type | Field and Description |
---|---|
protected static Logger |
log |
static int |
LOGIN_IDLE_TIMEOUT |
static int |
MSGCODE_REQEST |
static int |
MSGCODE_RESPONSE |
static int |
PREFAB_MAX_INCOMING_MESSAGE_LENGTH
maximum incoming message length
|
static boolean |
SecureToken
The master server sends us the account id in a secure manner by default.
|
static long |
TokenValidTime |
static java.lang.Integer |
WorldId
If WorldId is set, the ModeratorPlugin only accepts master tokens that specify
the correct world id.
|
DevMode, dumpAllThreadSubscription, dumpAllThreadSubscriptionLock, lock, MSG_TYPE_DUMP_ALL_THREAD_STACKS, MSG_TYPE_GET_PROPERTY, MSG_TYPE_GET_PROPERTY_NAMES, MSG_TYPE_PLUGIN_STATE, MSG_TYPE_RELOAD_TEMPLATES, MSG_TYPE_SET_PROPERTY, MSG_TYPE_SET_PROPERTY_NONBLOCK, MSG_TYPE_TRANSFER_OBJECT, pluginStateSubscription, propertySubscription, selectionFilter, selectionSubscription, subObjectSubscription
NO_FLAGS, RESPONSE_EXPECTED
Constructor and Description |
---|
ModeratorPlugin() |
Modifier and Type | Method and Description |
---|---|
int |
getTCPPort()
This method returns the port the prefab plugin will listen to for incoming tcp
connection.
|
protected ModeratorPlugin.GetModeratorResponseMessage |
handleMessage(ModeratorPlugin.ModeratorMessage message,
ModeratorPlugin.SocketHandler clientSocket)
Respond to a Moderator data request from the client.
|
void |
onActivate()
for developers extending the EnginePlugin object, it may
be easier to use the onActivate() method which gets
called when the plugin is being activated by the Engine.
|
void |
onTcpAccept(java.nio.channels.SocketChannel clientSocket) |
void |
setTCPPort(int port)
Set the port the Moderator plugin will listen to for incoming tcp connection.
|
activate, createMBeanInstance, createSubscription, getHookManager, 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, ReloadTemplates, sendSubObjectResponse, sendSubObjectResponse, sendSubObjectResponse, setName, setObjectProperties, setObjectProperties, setObjectProperties, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectProperty, setObjectPropertyNoResponse, setPercentCPULoad, setPluginAvailable, setPluginInfo, setPluginType, setPropertyImpl, transferObject
protected static final Logger log
public static final int MSGCODE_REQEST
public static final int MSGCODE_RESPONSE
public static final int LOGIN_IDLE_TIMEOUT
public static int PREFAB_MAX_INCOMING_MESSAGE_LENGTH
public static boolean SecureToken
public static long TokenValidTime
public static java.lang.Integer WorldId
public void setTCPPort(int port)
port
- the port number used for incoming tcp connectionspublic int getTCPPort()
setTCPPort(int)
public void onActivate()
EnginePlugin
onActivate
in class EnginePlugin
public void onTcpAccept(java.nio.channels.SocketChannel clientSocket)
onTcpAccept
in interface TcpAcceptCallback
protected ModeratorPlugin.GetModeratorResponseMessage handleMessage(ModeratorPlugin.ModeratorMessage message, ModeratorPlugin.SocketHandler clientSocket)
message
contains the desired Moderator properties.
Implementations must not read or write data to the clientSocket
.