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
FieldsModifier and TypeFieldDescriptionstatic final StringConstantAPPSERVER="AppServer"static final StringConstantAPPSERVER_ALARM_CONFIG_NAME="AppServer.alarmConfigName"static final StringSystem 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 StringConstantAPPSERVER_CONFIG_NAME="AppServer.configName"static final StringSystem property name which instructs app server only to export alarm configuration and then exit.static final StringSystem property name, which is first checked, when server starts.static final StringSystem property name usually provided trough init file, which define which input file with runtime configuration to load into app server.static final StringConstantAPPSERVER_PASSPHRASE="AppServer.passphrase"static final StringConstantAPPSERVER_PERSISTENCY_FILE="AppServer.persistencyFile"static final StringConstantDEFAULT_ALARM_CONFIG_NAME="ANKA Machine"static final StringConstantDEFAULT_CONFIG_NAME="default"static final StringDefault value taken for system AppServer.input (APPSERVER_INIT_FILEAPPSERVER_INIT_FILE).static final StringConstantDEFAULT_PASSPHRASE="please"static final StringConstantDEFAULT_PERSISTENCY_FILE="var/persistency.xml"Fields inherited from class com.cosylab.epics.caj.cas.util.DefaultServerImpl
pvs -
Constructor Summary
ConstructorsConstructorDescriptionServer()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 TypeMethodDescriptionvoidactivate()activate.voiddestroy()destroy.Getter for the fieldconfiguration.Getter for the fielddatabase.Getter for the fieldinputData.booleanisActive()isActive.booleanisEmbedded.static voidmain.gov.aps.jca.cas.ProcessVariableprocessVariableAttach(String aliasName, gov.aps.jca.cas.ProcessVariableEventCallback eventCallback, gov.aps.jca.cas.ProcessVariableAttachCallback asyncCompletionCallback) gov.aps.jca.cas.ProcessVariableExistanceCompletionprocessVariableExistanceTest(String aliasName, InetSocketAddress clientAddress, gov.aps.jca.cas.ProcessVariableExistanceCallback asyncCompletionCallback) intpvCount()Number of PV connections made to this serverintrecordCount.booleanrequestShutdown(String passphrase) requestShutdown.voidrun()voidSetter 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- aPropertiesobject- 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- aPropertiesobjectembedded- a boolean- Throws:
RemoteException- if any.org.apache.commons.configuration.ConfigurationException- if any.
-
-
Method Details
-
main
main.
- Parameters:
args- an array ofStringobjects
-
isEmbedded
public boolean isEmbedded()isEmbedded.
- Returns:
- a boolean
-
getInputData
Getter for the field
inputData.- Returns:
- a
ConfigurationManager.ConfigurationVisitorobject
-
setInputData
Setter for the field
inputData.- Parameters:
inputData- aConfigurationManager.ConfigurationVisitorobject
-
getConfiguration
Getter for the field
configuration.- Returns:
- a
Propertiesobject
-
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
Databaseobject
-
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:
processVariableExistanceTestin interfacegov.aps.jca.cas.Server- Overrides:
processVariableExistanceTestin classcom.cosylab.epics.caj.cas.util.DefaultServerImpl- Throws:
gov.aps.jca.CAExceptionIllegalArgumentExceptionIllegalStateException
-
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:
processVariableAttachin interfacegov.aps.jca.cas.Server- Overrides:
processVariableAttachin classcom.cosylab.epics.caj.cas.util.DefaultServerImpl- Throws:
gov.aps.jca.CAStatusExceptionIllegalArgumentExceptionIllegalStateException
-
requestShutdown
requestShutdown.
- Parameters:
passphrase- aStringobject- 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
-