|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.aps.jca.Context
public abstract class Context
The class representing a CA Context. A Context controls all IO operations and the circuits thru which Channels will be created and connected. Since CA 3.14 an application can create more than one context, thus ehancing IO control and Channels managment. Context are created thru the JCALibrary factory class.
JCALibrary| Constructor Summary | |
|---|---|
Context()
|
|
| Method Summary | |
|---|---|
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(java.lang.String name)
Create a new Channel using this context to access a process variable. |
Channel |
createChannel(java.lang.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(java.lang.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(java.lang.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(java.io.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Context()
| Method Detail |
|---|
public abstract Version getVersion()
public void initialize()
throws CAException
CAException
public abstract ContextMessageListener[] getContextMessageListeners()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the context has been destroyed.
public abstract void addContextMessageListener(ContextMessageListener l)
throws CAException,
java.lang.IllegalStateException
l - the listener to add
java.lang.IllegalStateException - if the context has been destroyed.
CAException
public abstract void removeContextMessageListener(ContextMessageListener l)
throws CAException,
java.lang.IllegalStateException
l - the listener to remove
java.lang.IllegalStateException - if the context has been destroyed.
CAException
public abstract ContextExceptionListener[] getContextExceptionListeners()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the context has been destroyed.
public abstract void addContextExceptionListener(ContextExceptionListener l)
throws CAException,
java.lang.IllegalStateException
l - the listener to add
java.lang.IllegalStateException - if the context has been destroyed.
CAException
public abstract void removeContextExceptionListener(ContextExceptionListener l)
throws CAException,
java.lang.IllegalStateException
l - the listener to remove
java.lang.IllegalStateException - if the context has been destroyed.
CAException
public abstract void destroy()
throws CAException,
java.lang.IllegalStateException
java.lang.IllegalStateException - if the context has been destroyed.
CAException
public Channel createChannel(java.lang.String name)
throws CAException,
java.lang.IllegalArgumentException,
java.lang.IllegalStateException
name - the process variable to connect to.
CAException - is thrown if a Channel Access error occured while creating the channel.
java.lang.IllegalArgumentException - is thrown if the channel's name is null or empty.
java.lang.IllegalStateException - if the context has been destroyed.
public Channel createChannel(java.lang.String name,
short priority)
throws CAException,
java.lang.IllegalArgumentException,
java.lang.IllegalStateException
name - the process variable to connect to.priority - channel process priority
CAException - is thrown if a Channel Access error occured while creating the channel.
java.lang.IllegalArgumentException - is thrown if the channel's name is null or empty.
java.lang.IllegalStateException - if the context has been destroyed.
public Channel createChannel(java.lang.String name,
ConnectionListener l)
throws CAException,
java.lang.IllegalStateException
name - the process variable to connect to.l - the ConnectionListener.priority - channel process priority
CAException - is thrown if a Channel Access error occured while creating the channel.
java.lang.IllegalStateException - if the context has been destroyed.
public abstract Channel createChannel(java.lang.String name,
ConnectionListener l,
short priority)
throws CAException,
java.lang.IllegalStateException
name - the process variable to connect to.l - the ConnectionListener.
CAException - is thrown if a Channel Access error occured while creating the channel.
java.lang.IllegalStateException - if the context has been destroyed.public abstract Channel[] getChannels()
public abstract void pendIO(double timeout)
throws TimeoutException,
CAException,
java.lang.IllegalStateException
timeout - the timeout limit.
TimeoutException - if all the IO couldn't be processed.
CAException - if a Channel Exception error occured while processing IOs.
java.lang.IllegalStateException - if the context has been destroyed.
public abstract boolean testIO()
throws CAException,
java.lang.IllegalStateException
CAException - if a Channel Access error occured while testing IOs
java.lang.IllegalStateException - if the context has been destroyed.
public abstract void pendEvent(double time)
throws CAException,
java.lang.IllegalStateException
time - the time during which the Context will process events.
CAException - if a Channel Access error occured while pending events
java.lang.IllegalStateException - if the context has been destroyed.
public abstract void poll()
throws CAException,
java.lang.IllegalStateException
CAException - if a Channel Access error occured while testing IOs
java.lang.IllegalStateException - if the context has been destroyed.
public abstract void flushIO()
throws CAException,
java.lang.IllegalStateException
CAException - if a Channel Access error occured while flushing IOs
java.lang.IllegalStateException - if the context has been destroyed.
public abstract void attachCurrentThread()
throws CAException,
java.lang.IllegalStateException
java.lang.IllegalStateException - if the context has been destroyed.
or if the context doesn't support multiple threads.
CAException
public void printInfo()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the context has been destroyed.
public void printInfo(java.io.PrintStream out)
throws java.lang.IllegalStateException
out - the output stream.
java.lang.IllegalStateException - if the context has been destroyed.public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||