|
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
com.connecterra.ale.reader.SocketAcceptorDeviceChannel
public class SocketAcceptorDeviceChannel
A DeviceChannel implemented by a TCP listener which waits for connections from a remote host or hosts.
| Nested Class Summary | |
|---|---|
static interface |
SocketAcceptorDeviceChannel.SocketAcceptorListener
This interface must be implemented by any class which is set as an asynchronous listener on this channel. |
| Nested classes/interfaces inherited from class com.connecterra.ale.reader.DeviceChannel |
|---|
DeviceChannel.AbstractOpenChannel, DeviceChannel.MarkingInputStream |
| Constructor Summary | |
|---|---|
SocketAcceptorDeviceChannel(PluginConfig config,
String defaultPort)
Like SocketAcceptorDeviceChannel.SocketAcceptorDeviceChannel(PluginConfig,
String, String), with portKeyName set to "port". |
|
SocketAcceptorDeviceChannel(PluginConfig config,
String defaultPort,
String portKeyName)
Creates a new SocketAcceptorDeviceChannel
instance. |
|
| Method Summary | |
|---|---|
static void |
addToPluginMeta(DynamicConfigFactory factory,
PluginMeta pm,
String portKeyName,
String portDisplayName,
String defaultPort)
Adds PluginParameterMeta to the specified PluginMeta for each parameter read by the channel. |
int |
getConfiguredPort()
|
int |
getOpenPort()
|
void |
setListener(SocketAcceptorDeviceChannel.SocketAcceptorListener l)
Sets a listener whose methods are invoked via the associated ChannelManager proxy's ChannelManager.Proxy.listenerExecute(java.lang.Runnable) method when a new
connection is accepted or when input is available on one of the
accepted sockets. |
| Methods inherited from class com.connecterra.ale.reader.DeviceChannel |
|---|
close, getLogger, getReactor, markUsed, open, reactivateChannels |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketAcceptorDeviceChannel(PluginConfig config,
String defaultPort,
String portKeyName)
throws com.connecterra.ale.resources.PluginLoadException
SocketAcceptorDeviceChannel
instance. The portKeyName argument specifies the
config parameter from which the listener port is read. If the
listener port is 0, then the system will choose an available
port. The concatenation of the portKeyName
argument and "Timeout" specifies the config parameter from
which the timeout in milliseconds is read.
config - a PluginConfig valuedefaultPort - a String value which is used as
the default port number.portKeyName - a String value
com.connecterra.ale.resources.PluginLoadException - if a configuration error occurs
public SocketAcceptorDeviceChannel(PluginConfig config,
String defaultPort)
throws com.connecterra.ale.resources.PluginLoadException
SocketAcceptorDeviceChannel.SocketAcceptorDeviceChannel(PluginConfig,
String, String), with portKeyName set to "port".
config - a PluginConfig valuedefaultPort - a String value which is used as
the default port number.
com.connecterra.ale.resources.PluginLoadException - if a configuration error occurs| Method Detail |
|---|
public static void addToPluginMeta(DynamicConfigFactory factory,
PluginMeta pm,
String portKeyName,
String portDisplayName,
String defaultPort)
PluginParameterMeta to the specified PluginMeta for each parameter read by the channel.
Currently this adds parameters for the port to listen on, given
by the portDisplayName argument, and for the
socket timeout, which is the port display name followed by
" Timeout".
factory - a DynamicConfigFactory valuepm - a PluginMeta value to which parameters
are addedportKeyName - the String key name for the
parameter which contains the portportDisplayName - the String display name for
the parameter which contains the portdefaultPort - the String default port value
if none is specified.public int getConfiguredPort()
public int getOpenPort()
throws IOException
IOException - if the channel is not open.
public void setListener(SocketAcceptorDeviceChannel.SocketAcceptorListener l)
throws IOException
ChannelManager.Proxy.listenerExecute(java.lang.Runnable) method when a new
connection is accepted or when input is available on one of the
accepted sockets.
l - a SocketAcceptorListener value
IOException - if an I/O error occurs
IllegalStateException - if the channel is not open
|
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 | |||||||||