Constants.ChannelProperties| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
addressList
A space-separated list of broadcast address for process variable name resolution.
|
protected boolean |
autoAddressList
Define whether or not the network interfaces should be discovered at runtime.
|
protected java.util.Map<java.net.InetSocketAddress,BeaconHandler> |
beaconHandlers
Beacon handler map.
|
protected float |
beaconPeriod
Period in second between two beacon signals.
|
protected IntHashMap<ChannelImpl<?>> |
channelsByCID
Map of channels (keys are CIDs).
|
protected float |
connectionTimeout
If the context doesn't see a beacon from a server that it is connected to for
connectionTimeout seconds then a state-of-health message is sent to the server over TCP/IP.
|
protected int |
debugLevel
Debug level, turns on low-level debugging.
|
protected java.util.concurrent.ExecutorService |
executorService
General executor service (e.g.
|
protected LeaderFollowersThreadPool |
leaderFollowersThreadPool
Leader/followers thread pool.
|
protected int |
maxArrayBytes
Length in bytes of the maximum array size that may pass through CA, defaults to 0 (<=0 means unlimited).
|
protected java.lang.String |
monitorNotifierConfigImpl
Configuration for the monitor notifier.
|
protected Reactor |
reactor
Reactor.
|
protected int |
repeaterPort
Port number for the repeater to listen to.
|
protected java.util.concurrent.ScheduledFuture<?> |
repeaterRegistrationFuture
Repeater registration future.
|
protected IntHashMap<ResponseRequest> |
responseRequests
Map of requests (keys are IOID).
|
protected int |
serverPort
Port number for the server to listen to.
|
protected java.util.concurrent.ScheduledExecutorService |
timer
Timer.
|
CA_DEBUG, CA_DEFAULT_PRIORITY, CA_ECHO_TIMEOUT, CA_EXTENDED_MESSAGE_HEADER_SIZE, CA_HOSTNAME_KEY, CA_MAJOR_PROTOCOL_REVISION, CA_MESSAGE_HEADER_SIZE, CA_MINOR_PROTOCOL_REVISION, CA_MONITOR_NOTIFIER_DEFAULT_IMPL, CA_MONITOR_NOTIFIER_IMPL, CA_PORT_BASE, CA_PROTO_ACCESS_RIGHT_READ, CA_PROTO_ACCESS_RIGHT_WRITE, CA_REPEATER_PORT, CA_SEARCH_DONTREPLY, CA_SEARCH_DOREPLY, CA_SERVER_PORT, CA_STRIP_HOSTNAME, CA_UNKNOWN_MINOR_PROTOCOL_REVISION, CHANNEL_PRIORITY_ARCHIVE, CHANNEL_PRIORITY_DEFAULT, CHANNEL_PRIORITY_LINKS_DB, CHANNEL_PRIORITY_MAX, CHANNEL_PRIORITY_MIN, CHANNEL_PRIORITY_OPI, MAX_STRING_SIZE, MAX_TCP_RECV, MAX_UDP_RECV, MAX_UDP_SEND, UNREASONABLE_CHANNEL_NAME_LENGTH| Constructor and Description |
|---|
ContextImpl() |
ContextImpl(java.util.Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
beaconAnomalyNotify() |
void |
close() |
<T> Channel<T> |
createChannel(java.lang.String channelName,
java.lang.Class<T> channelType) |
<T> Channel<T> |
createChannel(java.lang.String channelName,
java.lang.Class<T> channelType,
int priority) |
boolean |
enqueueStatefullEvent(StatefullEventSource event) |
BeaconHandler |
getBeaconHandler(java.net.InetSocketAddress responseFrom)
Get (and if necessary create) beacon handler.
|
BroadcastTransport |
getBroadcastTransport() |
ChannelImpl<?> |
getChannel(int channelID)
Searches for a channel with given channel ID.
|
ChannelSearchManager |
getChannelSearchManager() |
float |
getConnectionTimeout() |
LeaderFollowersThreadPool |
getLeaderFollowersThreadPool() |
int |
getMaxArrayBytes() |
protected MonitorNotificationServiceFactory |
getMonitorNotificationServiceFactory() |
Reactor |
getReactor() |
ResponseRequest |
getResponseRequest(int ioid)
Searches for a response request with given channel IOID.
|
java.util.concurrent.ScheduledExecutorService |
getScheduledExecutor() |
int |
getServerPort() |
TransportRegistry |
getTransportRegistry() |
protected void |
initializeLogger(java.util.Properties properties)
Initialize context logger.
|
protected BroadcastTransport |
initializeUDPTransport() |
protected void |
loadConfig(java.util.Properties properties) |
protected boolean |
readBooleanProperty(java.util.Properties properties,
java.lang.String key,
boolean defaultValue) |
protected float |
readFloatProperty(java.util.Properties properties,
java.lang.String key,
float defaultValue) |
protected int |
readIntegerProperty(java.util.Properties properties,
java.lang.String key,
int defaultValue) |
protected java.lang.String |
readStringProperty(java.util.Properties properties,
java.lang.String key,
java.lang.String defaultValue) |
int |
registerResponseRequest(ResponseRequest request)
Register response request.
|
void |
repeaterConfirm(java.net.InetSocketAddress responseFrom) |
void |
searchResponse(int cid,
int sid,
short type,
int count,
short minorRevision,
java.net.InetSocketAddress serverAddress)
Search response from server (channel found).
|
ResponseRequest |
unregisterResponseRequest(ResponseRequest request)
Unregister response request.
|
protected int debugLevel
protected java.lang.String addressList
protected boolean autoAddressList
protected float connectionTimeout
protected float beaconPeriod
protected int repeaterPort
protected int serverPort
protected int maxArrayBytes
protected java.lang.String monitorNotifierConfigImpl
protected final java.util.concurrent.ScheduledExecutorService timer
protected final java.util.concurrent.ExecutorService executorService
protected volatile java.util.concurrent.ScheduledFuture<?> repeaterRegistrationFuture
protected final Reactor reactor
protected final LeaderFollowersThreadPool leaderFollowersThreadPool
protected final IntHashMap<ChannelImpl<?>> channelsByCID
protected final IntHashMap<ResponseRequest> responseRequests
protected final java.util.Map<java.net.InetSocketAddress,BeaconHandler> beaconHandlers
public ContextImpl()
public ContextImpl(java.util.Properties properties)
protected MonitorNotificationServiceFactory getMonitorNotificationServiceFactory()
protected java.lang.String readStringProperty(java.util.Properties properties,
java.lang.String key,
java.lang.String defaultValue)
protected boolean readBooleanProperty(java.util.Properties properties,
java.lang.String key,
boolean defaultValue)
protected float readFloatProperty(java.util.Properties properties,
java.lang.String key,
float defaultValue)
protected int readIntegerProperty(java.util.Properties properties,
java.lang.String key,
int defaultValue)
protected void loadConfig(java.util.Properties properties)
protected void initializeLogger(java.util.Properties properties)
properties - the properties to be used for the logger.loggeprotected BroadcastTransport initializeUDPTransport()
public <T> Channel<T> createChannel(java.lang.String channelName, java.lang.Class<T> channelType)
public <T> Channel<T> createChannel(java.lang.String channelName, java.lang.Class<T> channelType, int priority)
public void close()
close in interface java.lang.AutoCloseablepublic Reactor getReactor()
public ResponseRequest getResponseRequest(int ioid)
ioid - I/O ID.public int registerResponseRequest(ResponseRequest request)
request - request to register.public ResponseRequest unregisterResponseRequest(ResponseRequest request)
request - the request.nullpublic ChannelImpl<?> getChannel(int channelID)
channelID - CID.null if non-existent.public ChannelSearchManager getChannelSearchManager()
public BroadcastTransport getBroadcastTransport()
public int getServerPort()
public float getConnectionTimeout()
public int getMaxArrayBytes()
public TransportRegistry getTransportRegistry()
public LeaderFollowersThreadPool getLeaderFollowersThreadPool()
public void searchResponse(int cid,
int sid,
short type,
int count,
short minorRevision,
java.net.InetSocketAddress serverAddress)
cid - client channel ID.sid - server channel ID.type - channel native type code.count - channel element count.minorRevision - server minor CA revision.serverAddress - server address.public void repeaterConfirm(java.net.InetSocketAddress responseFrom)
public boolean enqueueStatefullEvent(StatefullEventSource event)
public void beaconAnomalyNotify()
public BeaconHandler getBeaconHandler(java.net.InetSocketAddress responseFrom)
responseFrom - remote source address of received beacon.public java.util.concurrent.ScheduledExecutorService getScheduledExecutor()