public class DefaultServerImpl extends Object implements Server
processVariableExistanceTest is called existance test is made on the hash-map.
processVariableAttach metod simply retrieves PV from the hash-map.| Constructor and Description |
|---|
DefaultServerImpl() |
| Modifier and Type | Method and Description |
|---|---|
MemoryProcessVariable |
createMemoryProcessVariable(String name,
DBRType type,
Object initialValue)
Convenience method to create and register new in-memory process variables.
|
ProcessVariable |
processVariableAttach(String aliasName,
ProcessVariableEventCallback eventCallback,
ProcessVariableAttachCallback asyncCompletionCallback)
This function is called every time that a client attaches to the PV.
|
ProcessVariableExistanceCompletion |
processVariableExistanceTest(String aliasName,
InetSocketAddress clientAddress,
ProcessVariableExistanceCallback asyncCompletionCallback)
This function is called by the server library when it needs to
determine if a named process variable (PV) exists (or could be created) in the
server tool.
|
void |
registerProcessVaribale(ProcessVariable pv)
Register process variable.
|
void |
registerProcessVaribale(String aliasName,
ProcessVariable pv)
Register process variable.
|
ProcessVariable |
unregisterProcessVaribale(String aliasName)
Unregister process variable.
|
protected Map pvs
public MemoryProcessVariable createMemoryProcessVariable(String name, DBRType type, Object initialValue)
name - process variable name.type - process variable native type.initialValue - process variable initial value (array expected).public void registerProcessVaribale(String aliasName, ProcessVariable pv)
aliasName is already registered this will override it.aliasName - process variable name.pv - process variable instance.public void registerProcessVaribale(ProcessVariable pv)
pv - process variable instance.public ProcessVariable unregisterProcessVaribale(String aliasName)
aliasName - process variable namenull if non unregistered.public ProcessVariable processVariableAttach(String aliasName, ProcessVariableEventCallback eventCallback, ProcessVariableAttachCallback asyncCompletionCallback) throws CAStatusException, IllegalArgumentException, IllegalStateException
ServerprocessVariableAttach in interface ServeraliasName - the process variable alias name.eventCallback - the process variable event callback (where PV reports value changes if interest is true).asyncCompletionCallback - if asynchronous completion is required method should return
null and call
ProcessVariableExistanceCompletionCallback.processVariableAttachCompleted() method.ProcessVariable instance, null if operation is to be done asynchronously or
exception is thrown in case of an error (non-existant PV, etc.).CAStatusException - is thrown if a Channel Access error occured while creating the channel.IllegalArgumentException - is thrown if the channel's name is null or empty.IllegalStateException - if the context has been destroyed.Server.processVariableAttach(java.lang.String, gov.aps.jca.cas.ProcessVariableEventCallback, gov.aps.jca.cas.ProcessVariableAttachCallback)public ProcessVariableExistanceCompletion processVariableExistanceTest(String aliasName, InetSocketAddress clientAddress, ProcessVariableExistanceCallback asyncCompletionCallback) throws CAException, IllegalArgumentException, IllegalStateException
ServerProcessVariableExistanceCompletion.DOES_NOT_EXIST_HERE if too many simultaneous
asynchronous operations are pending against the server.
The client library will retry the request at some time in the future.processVariableExistanceTest in interface ServeraliasName - the process variable alias name.clientAddress - the client which requested test.asyncCompletionCallback - if asynchronous completion is required method should return
ProcessVariableExistanceCompletion.ASYNC_COMPLETION and call
ProcessVariableExistanceCompletionCallback.processVariableExistanceTestCompleted() method.IllegalArgumentException - is thrown if the process variable name is invalid.IllegalStateException - if the context has been destroyed.CAExceptionServer.processVariableExistanceTest(java.lang.String, java.net.InetSocketAddress, gov.aps.jca.cas.ProcessVariableExistanceCallback)Copyright © 2004-2020 EPICS. All Rights Reserved.