Package org.scictrl.csshell.epics.server
Class Server
java.lang.Object
com.cosylab.epics.caj.cas.util.DefaultServerImpl
org.scictrl.csshell.epics.server.Server
- All Implemented Interfaces:
gov.aps.jca.cas.Server
,Runnable
Server class.
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
ConstantAPPSERVER="AppServer"
static final String
ConstantAPPSERVER_ALARM_CONFIG_NAME="AppServer.alarmConfigName"
static final String
System property name which defines XML file name into which CSS Beast alarm server configuration is exported.# IF this property is missing, then alarm export will be disabled.static final String
ConstantAPPSERVER_CONFIG_NAME="AppServer.configName"
static final String
System property name which instructs app server only to export alarm configuration and then exit.static final String
System property name, which is first checked, when server starts.static final String
System property name usually provided trough init file, which define which input file with runtime configuration to load into app server.static final String
ConstantAPPSERVER_PASSPHRASE="AppServer.passphrase"
static final String
ConstantAPPSERVER_PERSISTENCY_FILE="AppServer.persistencyFile"
static final String
ConstantDEFAULT_ALARM_CONFIG_NAME="ANKA Machine"
static final String
ConstantDEFAULT_CONFIG_NAME="default"
static final String
Default value taken for system AppServer.input (APPSERVER_INIT_FILEAPPSERVER_INIT_FILE
).static final String
ConstantDEFAULT_PASSPHRASE="please"
static final String
ConstantDEFAULT_PERSISTENCY_FILE="var/persistency.xml"
Fields inherited from class com.cosylab.epics.caj.cas.util.DefaultServerImpl
pvs
-
Constructor Summary
ConstructorDescriptionServer()
Constructor for Server.Server
(boolean embedded) Constructor for Server.Server
(Properties prop) Constructor for Server.Server
(Properties prop, boolean embedded) Constructor for Server. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
activate.void
destroy()
destroy.Getter for the fieldconfiguration
.Getter for the fielddatabase
.Getter for the fieldinputData
.boolean
isActive()
isActive.boolean
isEmbedded.static void
main.gov.aps.jca.cas.ProcessVariable
processVariableAttach
(String aliasName, gov.aps.jca.cas.ProcessVariableEventCallback eventCallback, gov.aps.jca.cas.ProcessVariableAttachCallback asyncCompletionCallback) gov.aps.jca.cas.ProcessVariableExistanceCompletion
processVariableExistanceTest
(String aliasName, InetSocketAddress clientAddress, gov.aps.jca.cas.ProcessVariableExistanceCallback asyncCompletionCallback) int
pvCount()
Number of PV connections made to this serverint
recordCount.boolean
requestShutdown
(String passphrase) requestShutdown.void
run()
void
Setter for the fieldinputData
.Methods inherited from class com.cosylab.epics.caj.cas.util.DefaultServerImpl
createMemoryProcessVariable, registerProcessVariable, registerProcessVariable, unregisterProcessVariable
-
Field Details
-
APPSERVER
ConstantAPPSERVER="AppServer"
- See Also:
-
APPSERVER_INIT_FILE
System property name, which is first checked, when server starts. Provides name of file with server initialization properties, which defines which serve to run and which configuration to load.- See Also:
-
APPSERVER_INPUT
System property name usually provided trough init file, which define which input file with runtime configuration to load into app server. This property is mandatory, if not provided, server will not start.- See Also:
-
APPSERVER_ALARM_EXPORT
System property name which defines XML file name into which CSS Beast alarm server configuration is exported.# IF this property is missing, then alarm export will be disabled.- See Also:
-
APPSERVER_ALARM_CONFIG_NAME
ConstantAPPSERVER_ALARM_CONFIG_NAME="AppServer.alarmConfigName"
- See Also:
-
APPSERVER_CONFIG_NAME
ConstantAPPSERVER_CONFIG_NAME="AppServer.configName"
- See Also:
-
APPSERVER_PASSPHRASE
ConstantAPPSERVER_PASSPHRASE="AppServer.passphrase"
- See Also:
-
APPSERVER_EXPORT_ONLY
System property name which instructs app server only to export alarm configuration and then exit. This functionality is used when only conversion of alarm configuration formats is required.- See Also:
-
APPSERVER_PERSISTENCY_FILE
ConstantAPPSERVER_PERSISTENCY_FILE="AppServer.persistencyFile"
- See Also:
-
DEFAULT_ALARM_CONFIG_NAME
ConstantDEFAULT_ALARM_CONFIG_NAME="ANKA Machine"
- See Also:
-
DEFAULT_CONFIG_NAME
ConstantDEFAULT_CONFIG_NAME="default"
- See Also:
-
DEFAULT_PASSPHRASE
ConstantDEFAULT_PASSPHRASE="please"
- See Also:
-
DEFAULT_PERSISTENCY_FILE
ConstantDEFAULT_PERSISTENCY_FILE="var/persistency.xml"
- See Also:
-
DEFAULT_INIT_FILE
Default value taken for system AppServer.input (APPSERVER_INIT_FILEAPPSERVER_INIT_FILE
). If no AppServer.init parameter was provided, then this file name will be searched for and loaded.- See Also:
-
-
Constructor Details
-
Server
Constructor for Server.
- Throws:
RemoteException
- if initialization of access to EPICS failsorg.apache.commons.configuration.ConfigurationException
- configuration fail
-
Server
public Server(Properties prop) throws RemoteException, org.apache.commons.configuration.ConfigurationException Constructor for Server.
- Parameters:
prop
- aProperties
object- Throws:
RemoteException
- if any.org.apache.commons.configuration.ConfigurationException
- if any.
-
Server
public Server(boolean embedded) throws RemoteException, org.apache.commons.configuration.ConfigurationException Constructor for Server.
- Parameters:
embedded
- a boolean- Throws:
RemoteException
- if initialization of access to EPICS failsorg.apache.commons.configuration.ConfigurationException
- configuration fail
-
Server
public Server(Properties prop, boolean embedded) throws RemoteException, org.apache.commons.configuration.ConfigurationException Constructor for Server.
- Parameters:
prop
- aProperties
objectembedded
- a boolean- Throws:
RemoteException
- if any.org.apache.commons.configuration.ConfigurationException
- if any.
-
-
Method Details
-
main
main.
- Parameters:
args
- an array ofString
objects
-
isEmbedded
public boolean isEmbedded()isEmbedded.
- Returns:
- a boolean
-
getInputData
Getter for the field
inputData
.- Returns:
- a
ConfigurationManager.ConfigurationVisitor
object
-
setInputData
Setter for the field
inputData
.- Parameters:
inputData
- aConfigurationManager.ConfigurationVisitor
object
-
getConfiguration
Getter for the field
configuration
.- Returns:
- a
Properties
object
-
isActive
public boolean isActive()isActive.
- Returns:
- a boolean
-
run
public void run() -
activate
public void activate() throws gov.aps.jca.CAExceptionactivate.
- Throws:
gov.aps.jca.CAException
- if any.
-
getDatabase
Getter for the field
database
.- Returns:
- a
Database
object
-
processVariableExistanceTest
public gov.aps.jca.cas.ProcessVariableExistanceCompletion processVariableExistanceTest(String aliasName, InetSocketAddress clientAddress, gov.aps.jca.cas.ProcessVariableExistanceCallback asyncCompletionCallback) throws gov.aps.jca.CAException, IllegalArgumentException, IllegalStateException - Specified by:
processVariableExistanceTest
in interfacegov.aps.jca.cas.Server
- Overrides:
processVariableExistanceTest
in classcom.cosylab.epics.caj.cas.util.DefaultServerImpl
- Throws:
gov.aps.jca.CAException
IllegalArgumentException
IllegalStateException
-
processVariableAttach
public gov.aps.jca.cas.ProcessVariable processVariableAttach(String aliasName, gov.aps.jca.cas.ProcessVariableEventCallback eventCallback, gov.aps.jca.cas.ProcessVariableAttachCallback asyncCompletionCallback) throws gov.aps.jca.CAStatusException, IllegalArgumentException, IllegalStateException - Specified by:
processVariableAttach
in interfacegov.aps.jca.cas.Server
- Overrides:
processVariableAttach
in classcom.cosylab.epics.caj.cas.util.DefaultServerImpl
- Throws:
gov.aps.jca.CAStatusException
IllegalArgumentException
IllegalStateException
-
requestShutdown
requestShutdown.
- Parameters:
passphrase
- aString
object- Returns:
- a boolean
-
destroy
public void destroy()destroy.
-
pvCount
public int pvCount()Number of PV connections made to this server- Returns:
- nuber of PV connections to this server
-
recordCount
public int recordCount()recordCount.
- Returns:
- a int
-