public class Context
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
Context()
Create an instance whose channel-access protocol configuration is based on
the values of operating system environmental variables, the values of the
the Java system properties, or twhen not otherwise specified, the library
defaults.
|
Context(java.util.Properties properties)
Create an instance whose channel-access protocol configuration is based on
the values of operating system environmental variables, the values of
the supplied properties object, or when not otherwise specified, the
library defaults.
|
| 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)
Creates a new channel of the specified name and type and with the
default priority.
|
<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.
|
public Context()
public Context(java.util.Properties properties)
properties - an object whose definitions may override the
values set in the operating system environment.java.lang.NullPointerException - if the properties argument was null.public <T> Channel<T> createChannel(java.lang.String channelName, java.lang.Class<T> channelType)
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.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.IllegalStateException - if the context was already closed.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.AutoCloseable