public abstract class BaseClientRequestHandler extends java.lang.Object implements IClientRequestHandler
Constructor and Description |
---|
BaseClientRequestHandler() |
Modifier and Type | Method and Description |
---|---|
protected ISFSApi |
getApi()
Get a reference to the main server side API
|
protected org.slf4j.Logger |
getLogger()
Obtain a direct reference to the Extension's logger
|
SFSExtension |
getParentExtension()
Obtain a reference to the parent extension.
|
protected void |
send(java.lang.String cmdName,
ISFSObject params,
java.util.List<User> recipients)
Broadcast a response back to multiple Users
|
protected void |
send(java.lang.String cmdName,
ISFSObject params,
java.util.List<User> recipients,
boolean useUDP)
Broadcast a response back to multiple Users
|
protected void |
send(java.lang.String cmdName,
ISFSObject params,
User recipient)
Send a response back to a User
|
protected void |
send(java.lang.String cmdName,
ISFSObject params,
User recipient,
boolean useUDP)
Send a response back to a User
|
void |
setParentExtension(SFSExtension ext) |
protected void |
trace(ExtensionLogLevel level,
java.lang.Object... args)
Trace a message to the console and log files using the specified logging level
|
protected void |
trace(java.lang.Object... args)
Traces a message to the console and log files using the Logger INFO level
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleClientRequest
public SFSExtension getParentExtension()
getParentExtension
in interface IClientRequestHandler
public void setParentExtension(SFSExtension ext)
setParentExtension
in interface IClientRequestHandler
protected ISFSApi getApi()
protected void send(java.lang.String cmdName, ISFSObject params, User recipient)
cmdName
- name of the "command" (or action id)params
- the parametersrecipient
- the recipient Userprotected void send(java.lang.String cmdName, ISFSObject params, java.util.List<User> recipients)
cmdName
- name of the "command" (or action id)params
- the parametersrecipients
- a list of recipientsprotected void send(java.lang.String cmdName, ISFSObject params, User recipient, boolean useUDP)
cmdName
- name of the "command" (or action id)params
- the parametersrecipient
- the recipient UseruseUDP
- if true the message will be sent as an UDP packet (default == TCP)protected void send(java.lang.String cmdName, ISFSObject params, java.util.List<User> recipients, boolean useUDP)
cmdName
- name of the "command" (or action id)params
- the parametersrecipients
- a list of recipientsuseUDP
- if true the message will be sent as an UDP packet (default == TCP)protected void trace(java.lang.Object... args)
args
- any number of strings/object to traceprotected void trace(ExtensionLogLevel level, java.lang.Object... args)
level
- the logging levelargs
- any number of object to traceprotected org.slf4j.Logger getLogger()