public abstract class AbstractChannelObjectPlugin extends AbstractHobsonPlugin
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
PROP_SERIAL_HOSTNAME |
protected static java.lang.String |
PROP_SERIAL_PORT |
| Constructor and Description |
|---|
AbstractChannelObjectPlugin(java.lang.String pluginId,
java.lang.String version,
java.lang.String description) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
configureChannel(ChannelConfig config)
Allows subclasses to configure the channel before it is used.
|
protected void |
configurePipeline(ChannelPipeline pipeline)
Configures the Netty channel pipeline.
|
protected abstract ChannelInboundHandlerAdapter |
getDecoder()
Returns the decoder that converts a sequence of bytes received from the channel into one or more
Java objects.
|
protected int |
getDefaultPort()
Indicates the default network port.
|
protected abstract ChannelOutboundHandlerAdapter |
getEncoder()
Returns an encoder that converts a Java object into a sequence of bytes from transmission over the
channel.
|
protected ChannelIdleDetectionConfig |
getIdleDetectionConfig()
Returns a configuration object used for idle detection.
|
protected boolean |
isConnected()
Indicates whether the channel is connected.
|
protected boolean |
isConnectionless() |
protected boolean |
isNetworkAddress()
Indicates whether the channel is a network connection.
|
protected boolean |
isSerialAddress()
Indicates whether the channel is a serial port.
|
protected abstract void |
onChannelConnected()
Called when the channel successfully connects.
|
protected abstract void |
onChannelData(java.lang.Object o)
Called when the channel receives data.
|
protected abstract void |
onChannelDisconnected()
Called when the channel disconnected.
|
void |
onPluginConfigurationUpdate(PropertyContainer config) |
void |
onRefresh() |
void |
onShutdown()
Callback method for plugins to perform tasks when they are being stopped.
|
void |
onStartup(PropertyContainer config)
Callback method for plugins to perform initialization once they've been started.
|
protected void |
send(java.lang.Object o)
Sends an object over the channel.
|
void |
setRemoteAddress(java.net.SocketAddress socketAddress)
Sets the remote address to use as the data channel.
|
addJobStatusMessage, deleteDeviceProxy, executeInEventLoop, executeTask, getAccessManager, getActionClass, getActionClasses, getConfigurationClass, getConfigurationPropertyTypes, getContext, getDataDirectory, getDataFile, getDescription, getDescriptor, getDeviceAdvertisementSnapshot, getDeviceConfigurationProperty, getDeviceLastCheckin, getDeviceProxies, getDeviceProxy, getDeviceVariableState, getDeviceVariableState, getDiscoManager, getEventLoopExecutor, getHubManager, getLocalHub, getName, getPublishedDeviceDescriptions, getRefreshInterval, getStatus, getTaskManager, getTaskProvider, getType, hasDeviceProxy, hasDeviceVariable, hasDeviceVariableState, hasDeviceVariableState, hasTaskProvider, onDeviceConfigurationUpdateEvent, onDeviceDeletedEvent, onDeviceVariablesUpdate, onHandleTaskEvents, onPluginConfigurationUpdateEvent, onSetDeviceVariables, postEvent, publishActionProvider, publishDeviceAdvertisement, publishDeviceProxy, publishDeviceProxy, publishTaskConditionClass, scheduleAtFixedRateInEventLoop, setAccessManager, setActionManager, setDeviceConfigurationProperties, setDeviceConfigurationProperty, setDeviceManager, setDiscoManager, setEventManager, setGlobalVariable, setGlobalVariables, setHubManager, setPluginConfigurationProperty, setPluginManager, setStatus, setTaskManager, setTaskProviderprotected static final java.lang.String PROP_SERIAL_PORT
protected static final java.lang.String PROP_SERIAL_HOSTNAME
public AbstractChannelObjectPlugin(java.lang.String pluginId,
java.lang.String version,
java.lang.String description)
public void onStartup(PropertyContainer config)
HobsonPluginconfig - the current plugin configurationpublic void onPluginConfigurationUpdate(PropertyContainer config)
onPluginConfigurationUpdate in class AbstractHobsonPluginpublic void onRefresh()
onRefresh in interface HobsonPluginonRefresh in class AbstractHobsonPluginpublic void onShutdown()
HobsonPluginpublic void setRemoteAddress(java.net.SocketAddress socketAddress)
socketAddress - the addressprotected boolean isNetworkAddress()
protected boolean isConnectionless()
protected boolean isSerialAddress()
protected boolean isConnected()
protected int getDefaultPort()
protected void send(java.lang.Object o)
o - the object to sendprotected ChannelIdleDetectionConfig getIdleDetectionConfig()
protected abstract ChannelInboundHandlerAdapter getDecoder()
protected abstract ChannelOutboundHandlerAdapter getEncoder()
protected abstract void configureChannel(ChannelConfig config)
config - the channel configurationprotected abstract void onChannelConnected()
protected abstract void onChannelData(java.lang.Object o)
o - the data receivedprotected abstract void onChannelDisconnected()
protected void configurePipeline(ChannelPipeline pipeline)
pipeline - the current channel pipelineCopyright © 2015 Whizzo Software LLC. All rights reserved.