public class PersistentQueryControllerClient extends ControllerHashtableClient implements PersistentQueryScriptSource
id| Constructor and Description |
|---|
PersistentQueryControllerClient(com.fishlib.io.logger.Logger log,
com.fishlib.io.sched.Scheduler scheduler,
com.fishlib.net.CommBase.ConnectionStatusHandler connectionStatusHandler,
com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams,
boolean async) |
PersistentQueryControllerClient(com.fishlib.io.logger.Logger log,
com.fishlib.io.sched.Scheduler scheduler,
com.fishlib.net.CommBase.ConnectionStatusHandler connectionStatusHandler,
com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams,
boolean async,
com.fishlib.base.hash.IndexableMap<Long,PersistentQueryInfo> map) |
| Modifier and Type | Method and Description |
|---|---|
long |
addQueryConfiguration(PersistentQueryConfiguration config)
Adds a configuration to the controller's hash table.
|
boolean |
authenticateToController(com.fishlib.auth.AuthToken authToken)
Present an authentication token to the controller.
|
static void |
disallowReconnections() |
String[] |
getAllGroups()
Returns the list of all groups.
|
String[] |
getAllUsers()
Returns the list of all users.
|
String[] |
getGroupsForUser(com.fishlib.auth.UserContext userContext)
Return the groups which a user belongs to.
|
String |
getScriptBody(boolean relative,
String scriptPath,
long configSerial,
ScriptPathLoaderState scriptLoaderState)
Get a script by path for a specific serial ID and a specific state.
|
String |
getScriptBody(boolean relative,
String scriptPath,
ScriptPathLoaderState scriptLoaderState)
Get a script by path and state.
|
String |
getScriptBody(boolean relative,
String scriptPath,
String ownerName,
ScriptPathLoaderState scriptLoaderState)
Get a script by path for a specific owner and state.
|
Set<String> |
getScriptDisplayPaths(long configSerial,
ScriptPathLoaderState scriptLoaderState)
Get all display paths available to a specific PersistentQuery serial ID and a specific state..
|
Set<String> |
getScriptDisplayPaths(ScriptPathLoaderState scriptLoaderState)
Get all available display paths for a specific state.
|
Set<String> |
getScriptDisplayPaths(String ownerName,
ScriptPathLoaderState scriptLoaderState)
Get all display paths available to a specific owner and state.
|
PersistentQueryControllerConfiguration |
getServerConfiguration()
Gets the server configuration from the controller.
|
String[] |
getUsersForGroup(String group)
Return the users which belong to a group.
|
void |
handleConnectionReestablished() |
boolean |
isAclEditor(com.fishlib.auth.UserContext userContext)
Returns true if the effective user is an ACL editor
|
boolean |
isSuperUser(com.fishlib.auth.UserContext userContext)
Returns true if the effective user is a superuser.
|
void |
modifyQueryConfiguration(PersistentQueryConfiguration config)
Modifies a configuration in the controller's hash table.
|
void |
reloadConfiguration()
Reloads the controller configuration.
|
void |
removeQueryConfiguration(PersistentQueryConfiguration config)
Removes a configuration from the controller's hash table.
|
void |
restartQuery(PersistentQueryConfiguration config)
Restarts a persistent query.
|
void |
stopQuery(PersistentQueryConfiguration config)
Stops a persistent query.
|
addEventHandlerAndGetData, addReloadCommandListener, clear, containsKey, containsValue, disconnect, entrySet, get, getComm, getData, getUnderlyingMap, handleClientDeath, handleCommand, handleConnectionLost, handleInitialConnection, isEmpty, keySet, put, putAll, remove, size, subscribeToAll, valuesaddCommandHandler, addEventHandler, removeCommandHandler, removeEventHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetScriptBody, getScriptDisplayPathsgetScriptBody, getScriptBody, getScriptDisplayPaths, getScriptDisplayPathscompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic PersistentQueryControllerClient(com.fishlib.io.logger.Logger log,
com.fishlib.io.sched.Scheduler scheduler,
@Nullable
com.fishlib.net.CommBase.ConnectionStatusHandler connectionStatusHandler,
@Nullable
com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams,
boolean async)
throws IOException
IOExceptionpublic PersistentQueryControllerClient(com.fishlib.io.logger.Logger log,
com.fishlib.io.sched.Scheduler scheduler,
@Nullable
com.fishlib.net.CommBase.ConnectionStatusHandler connectionStatusHandler,
@Nullable
com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams,
boolean async,
com.fishlib.base.hash.IndexableMap<Long,PersistentQueryInfo> map)
throws IOException
IOExceptionpublic static void disallowReconnections()
public long addQueryConfiguration(PersistentQueryConfiguration config)
config - the configuration to addpublic void modifyQueryConfiguration(PersistentQueryConfiguration config)
config - the updated configurationpublic void removeQueryConfiguration(PersistentQueryConfiguration config)
config - the configuration to removepublic void restartQuery(PersistentQueryConfiguration config)
config - the persistent query configuration to be restarted.public void stopQuery(PersistentQueryConfiguration config)
config - the persistent query configuration to be stopped.public void reloadConfiguration()
public PersistentQueryControllerConfiguration getServerConfiguration()
public Set<String> getScriptDisplayPaths(String ownerName, ScriptPathLoaderState scriptLoaderState)
RemoteScriptSourcegetScriptDisplayPaths in interface RemoteScriptSourceownerName - A specific user.scriptLoaderState - The state to get paths from or ScriptPathLoaderState.NONE
to get the latest version.public Set<String> getScriptDisplayPaths(ScriptPathLoaderState scriptLoaderState)
RemoteScriptSourcegetScriptDisplayPaths in interface RemoteScriptSourcescriptLoaderState - The state to get paths from or ScriptPathLoaderState.NONE
to get the latest version.public Set<String> getScriptDisplayPaths(long configSerial, ScriptPathLoaderState scriptLoaderState)
PersistentQueryScriptSourcegetScriptDisplayPaths in interface PersistentQueryScriptSourceconfigSerial - A serial ID.scriptLoaderState - A specific state to retrieve scripts from or ScriptPathLoaderState.NONE
to get the latest version.public String getScriptBody(boolean relative, String scriptPath, ScriptPathLoaderState scriptLoaderState)
RemoteScriptSourcegetScriptBody in interface RemoteScriptSourcerelative - Is the path a relative path?scriptPath - The path string.scriptLoaderState - The state to get scripts from or ScriptPathLoaderState.NONE
to get the latest version.public String getScriptBody(boolean relative, String scriptPath, long configSerial, ScriptPathLoaderState scriptLoaderState)
PersistentQueryScriptSourcegetScriptBody in interface PersistentQueryScriptSourcerelative - Is the path a relative path?scriptPath - The path string.configSerial - The Serial ID.scriptLoaderState - A specific state to retrieve scripts from or ScriptPathLoaderState.NONE
to get the latest version.public String getScriptBody(boolean relative, String scriptPath, String ownerName, ScriptPathLoaderState scriptLoaderState)
RemoteScriptSourcegetScriptBody in interface RemoteScriptSourcerelative - Is the path a relative path?scriptPath - The path string.ownerName - The owner.scriptLoaderState - The state to get script from or ScriptPathLoaderState.NONE
to get the latest version.public boolean authenticateToController(com.fishlib.auth.AuthToken authToken)
authToken - the token to present to the controllerpublic String[] getGroupsForUser(com.fishlib.auth.UserContext userContext)
userContext - the userContext to get membership forpublic String[] getUsersForGroup(String group)
group - the group to get membership forpublic boolean isSuperUser(com.fishlib.auth.UserContext userContext)
userContext - the usercontext to querypublic boolean isAclEditor(com.fishlib.auth.UserContext userContext)
userContext - the usercontext to querypublic String[] getAllGroups()
public String[] getAllUsers()
public void handleConnectionReestablished()
handleConnectionReestablished in interface com.fishlib.net.CommBase.ConnectionStatusHandlerhandleConnectionReestablished in class ControllerHashtableClient