|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.connecterra.ale.reader.DeviceChannel.AbstractOpenChannel
protected abstract class DeviceChannel.AbstractOpenChannel
An instance of this class should be instantiated and returned
by the channel when the channel is opened. If the channel
accepts asynchronous input, it should invoke any callbacks by
using this class's DeviceChannel.AbstractOpenChannel.listenerExecute(java.lang.Runnable)
method when such data is
available. This will ensure that the work is correctly passed
to the associated ChannelManager's proxy, and ensure that stale
input does not cause callback invocations after the channel has
been closed.
Constructor Summary | |
---|---|
protected |
DeviceChannel.AbstractOpenChannel()
|
Method Summary | |
---|---|
protected void |
listenerExecute(Runnable r)
Execute some driver business logic (represented by the Runnable) using the associated ChannelManager's proxy. |
protected abstract void |
resumeListener()
Resume the blocking thread. |
protected abstract boolean |
suspendListener()
This method should do whatever is necessary to ensure that the asynchronous input is ignored until resumeListener() is called. |
protected abstract void |
terminate()
Makes a best-effort attempt to drop resources in use by the channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DeviceChannel.AbstractOpenChannel()
Method Detail |
---|
protected abstract void terminate()
close
because it may be invoked even while
another thread is running a method on this object, so the
implementation must take care if
close
and terminate
are called at
the same time.
protected abstract boolean suspendListener()
close
can be called
concurrently; if this happens and is detected, it should
return false to indicate the channel has been closed.
protected abstract void resumeListener() throws IOException
DeviceChannel.AbstractOpenChannel.suspendListener()
did. Unlike that method, however, the
implementation does not need to be reentrant.
IOException
protected void listenerExecute(Runnable r)
|
Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |