public abstract class Context extends Object
JCALibrary| Constructor and Description |
|---|
Context() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addContextExceptionListener(ContextExceptionListener l)
Add a ContextExceptionListener to this context.
|
abstract void |
addContextMessageListener(ContextMessageListener l)
Add a ContextMessageListener to this context.
|
abstract void |
attachCurrentThread()
Attach the calling thread to the list of threads allowed to access this context and all its channels.
|
Channel |
createChannel(String name)
Create a new Channel using this context to access a process variable.
|
Channel |
createChannel(String name,
ConnectionListener l)
Create a new Channel using this context to access a process variable with a ConnectionListener
to receive ConnectionEvent from the newly created Channel.
|
abstract Channel |
createChannel(String name,
ConnectionListener l,
short priority)
Create a new Channel using this context to access a process variable with a ConnectionListener
to receive ConnectionEvent from the newly created Channel.
|
Channel |
createChannel(String name,
short priority)
Create a new Channel using this context to access a process variable.
|
abstract void |
destroy()
Clear all ressources attached to this Context
|
void |
dispose() |
abstract void |
flushIO()
Flush outstanding IO request to the servers.
|
abstract Channel[] |
getChannels()
Get all channels of this context.
|
abstract ContextExceptionListener[] |
getContextExceptionListeners() |
abstract ContextMessageListener[] |
getContextMessageListeners() |
abstract Version |
getVersion() |
void |
initialize() |
abstract void |
pendEvent(double time)
Process all pending events.
|
abstract void |
pendIO(double timeout)
Process all pending IO operations.
|
abstract void |
poll()
Flush the send buffer and process any outstanding CA background activity.
|
void |
printInfo()
Prints detailed information about the Context to the standard output stream.
|
void |
printInfo(PrintStream out)
Prints detailed information about the Context to the specified output stream.
|
abstract void |
removeContextExceptionListener(ContextExceptionListener l)
Removes a ContextExceptionListener from this context.
|
abstract void |
removeContextMessageListener(ContextMessageListener l)
Removes a ContextMessageListener from this context.
|
abstract boolean |
testIO()
Tests if all synchronous (ie not specifying listeners) get and channel creation requests are completed.
|
public abstract Version getVersion()
public void initialize()
throws CAException
CAExceptionpublic abstract ContextMessageListener[] getContextMessageListeners() throws IllegalStateException
IllegalStateException - if the context has been destroyed.public abstract void addContextMessageListener(ContextMessageListener l) throws CAException, IllegalStateException
l - the listener to addIllegalStateException - if the context has been destroyed.CAExceptionpublic abstract void removeContextMessageListener(ContextMessageListener l) throws CAException, IllegalStateException
l - the listener to removeIllegalStateException - if the context has been destroyed.CAExceptionpublic abstract ContextExceptionListener[] getContextExceptionListeners() throws IllegalStateException
IllegalStateException - if the context has been destroyed.public abstract void addContextExceptionListener(ContextExceptionListener l) throws CAException, IllegalStateException
l - the listener to addIllegalStateException - if the context has been destroyed.CAExceptionpublic abstract void removeContextExceptionListener(ContextExceptionListener l) throws CAException, IllegalStateException
l - the listener to removeIllegalStateException - if the context has been destroyed.CAExceptionpublic abstract void destroy()
throws CAException,
IllegalStateException
IllegalStateException - if the context has been destroyed.CAExceptionpublic Channel createChannel(String name) throws CAException, IllegalArgumentException, IllegalStateException
name - the process variable to connect to.CAException - 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.public Channel createChannel(String name, short priority) throws CAException, IllegalArgumentException, IllegalStateException
name - the process variable to connect to.priority - channel process priorityCAException - 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.public Channel createChannel(String name, ConnectionListener l) throws CAException, IllegalStateException
name - the process variable to connect to.l - the ConnectionListener.CAException - is thrown if a Channel Access error occured while creating the channel.IllegalStateException - if the context has been destroyed.public abstract Channel createChannel(String name, ConnectionListener l, short priority) throws CAException, IllegalStateException
name - the process variable to connect to.l - the ConnectionListener.priority - channel process priorityCAException - is thrown if a Channel Access error occured while creating the channel.IllegalStateException - if the context has been destroyed.public abstract Channel[] getChannels()
public abstract void pendIO(double timeout)
throws TimeoutException,
CAException,
IllegalStateException
timeout - the timeout limit.TimeoutException - if all the IO couldn't be processed.CAException - if a Channel Exception error occured while processing IOs.IllegalStateException - if the context has been destroyed.public abstract boolean testIO()
throws CAException,
IllegalStateException
CAException - if a Channel Access error occured while testing IOsIllegalStateException - if the context has been destroyed.public abstract void pendEvent(double time)
throws CAException,
IllegalStateException
time - the time during which the Context will process events.CAException - if a Channel Access error occured while pending eventsIllegalStateException - if the context has been destroyed.public abstract void poll()
throws CAException,
IllegalStateException
CAException - if a Channel Access error occured while testing IOsIllegalStateException - if the context has been destroyed.public abstract void flushIO()
throws CAException,
IllegalStateException
CAException - if a Channel Access error occured while flushing IOsIllegalStateException - if the context has been destroyed.public abstract void attachCurrentThread()
throws CAException,
IllegalStateException
IllegalStateException - if the context has been destroyed.
or if the context doesn't support multiple threads.CAExceptionpublic void printInfo()
throws IllegalStateException
IllegalStateException - if the context has been destroyed.public void printInfo(PrintStream out) throws IllegalStateException
out - the output stream.IllegalStateException - if the context has been destroyed.public void dispose()
Copyright © 2004-2020 EPICS. All Rights Reserved.