public interface ConnectionConfig extends Config<ConnectionConfig>
When a connection is created, each instance of the source component will be setup to send messages to each instance of the target component. How messages are routed to multiple target instances can be configured using selectors.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConnectionConfig.Source
Connection source.
|
static interface |
ConnectionConfig.Target
Connection target.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTION_HOOKS
hooks is an array defining connection hooks. |
static String |
CONNECTION_SELECTOR
selector is an object defining the connection selector. |
static String |
CONNECTION_SOURCE
source is an object defining the connection source. |
static String |
CONNECTION_TARGET
target is an object defining the connection target. |
| Modifier and Type | Method and Description |
|---|---|
ConnectionConfig |
addHook(IOHook hook)
Adds an input/output hook to the connection.
|
ConnectionConfig |
allSelect()
Sets an all selector on the connection.
|
ConnectionConfig |
customSelect(Selector selector)
Sets a custom selector on the connection.
|
ConnectionConfig |
fairSelect()
Sets a fair selector on the connection.
|
List<IOHook> |
getHooks()
Returns a list of connection hooks.
|
Selector |
getSelector()
Returns the connection selector.
|
ConnectionConfig.Source |
getSource()
Returns the connection source.
|
ConnectionConfig.Target |
getTarget()
Returns the connection target.
|
ConnectionConfig |
hashSelect()
Sets a mod-hash based selector on the connection.
|
ConnectionConfig |
randomSelect()
Sets a random selector on the connection.
|
ConnectionConfig |
roundSelect()
Sets a round-robin selector on the connection.
|
ConnectionConfig |
setSelector(Selector selector)
Sets the connection selector.
|
static final String CONNECTION_SOURCE
source is an object defining the connection source. See the
ConnectionConfig.Source documentation for details on the source structure.static final String CONNECTION_TARGET
target is an object defining the connection target. See the
ConnectionConfig.Target documentation for details on the target structure.static final String CONNECTION_HOOKS
hooks is an array defining connection hooks. Each element in the array
must be an object containing a hook field which indicates the hook
class name.static final String CONNECTION_SELECTOR
selector is an object defining the connection selector. The selector
definition should contain a type which indicates the selector type,
e.g. round-robin, random, hash, fair,
all, or custom. If a custom selector is indicated
then an additional selector field must be provided which indicates the
custom selector class.ConnectionConfig.Source getSource()
ConnectionConfig.Target getTarget()
ConnectionConfig addHook(IOHook hook)
hook - The hook to add.List<IOHook> getHooks()
Selector getSelector()
ConnectionConfig setSelector(Selector selector)
selector - The selector with which to select individual connections.ConnectionConfig roundSelect()
ConnectionConfig randomSelect()
ConnectionConfig hashSelect()
ConnectionConfig fairSelect()
ConnectionConfig allSelect()
ConnectionConfig customSelect(Selector selector)
selector - The custom selector to set.Copyright © 2013-2014. All Rights Reserved.