public class ContextImpl
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
ContextImpl(ProtocolConfiguration protocolConfiguration)
Creates an instance based on the supplied EPICS channel-access protocol
configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the context, disposing of all underlying resources.
|
<T> Channel<T> |
createChannel(java.lang.String channelName,
java.lang.Class<T> channelType,
int priority)
Creates a new channel of the specified name and type and with the specified priority.
|
int |
registerResponseRequest(ResponseRequest request)
Register response request.
|
ResponseRequest |
unregisterResponseRequest(ResponseRequest request)
Unregister response request.
|
public ContextImpl(ProtocolConfiguration protocolConfiguration)
protocolConfiguration - the configuration.java.lang.NullPointerException - if the properties argument was null.public <T> Channel<T> createChannel(java.lang.String channelName, java.lang.Class<T> channelType, int priority)
T - the type parameter.channelName - the name of the Channel (which should follow standard
EPICS naming conventions).channelType - the type of the channel which will determine the
type used when communicating with the remote channel access server.
Note: <Object> can be used to force the channel to use the
native type on the server.priority - the priority to be registered with the channel access server.java.lang.NullPointerException - if the channel name was null.java.lang.NullPointerException - if the channel type was null.java.lang.IllegalArgumentException - if the channel name was an empty string.java.lang.IllegalArgumentException - if the channel name was of an unreasonable length.java.lang.IllegalArgumentException - if the channel type was invalid.java.lang.IllegalArgumentException - if the priority was outside the allowed range.java.lang.IllegalStateException - if the context was already closed.public void close()
close in interface java.lang.AutoCloseablepublic int registerResponseRequest(ResponseRequest request)
request - request to register.public ResponseRequest unregisterResponseRequest(ResponseRequest request)
request - the request.null