public interface Component
Components receive messages on input ports and send messages on output
ports, but component-to-component relationships are defined externally
to the component implementation in the NetworkConfig. This means
that when a message is sent to an output port, the component doesn't
know where the message will go. Instead, Vertigo handles message routing
internally, abstracting relationship details from component implementations.
Each component may define any number of input and output ports. Ports are
created lazily by simply referencing them in InputCollector and
OutputCollector interfaces. If a message is sent to a port that
has no connections then the message will simply disappear.
| Modifier and Type | Method and Description |
|---|---|
Cluster |
cluster()
Returns the cluster to which the component belongs.
|
org.vertx.java.platform.Container |
container()
Gets the component container instance.
|
InstanceContext |
context()
Returns the component instance context.
|
InputCollector |
input()
Returns the component's
InputCollector. |
org.vertx.java.core.logging.Logger |
logger()
Returns the instance logger.
|
OutputCollector |
output()
Returns the component's
OutputCollector. |
Component |
start()
Starts the component.
|
Component |
start(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Component>> doneHandler)
Starts the component.
|
org.vertx.java.core.Vertx |
vertx()
Gets the component Vertx instance.
|
org.vertx.java.core.Vertx vertx()
org.vertx.java.platform.Container container()
InputCollector input()
InputCollector. This is the element of the
component which provides an interface for receiving messages from other components.InputCollector.OutputCollector output()
OutputCollector. This is the element of the
component which provides an interface for sending messages to other components.OutputCollector.InstanceContext context()
Cluster cluster()
The cluster type is dependent upon the method by which the component's network was deployed. If the network was deployed in local-mode then the cluster will be locally supported. If the network was deployed in cluster-mode then the cluster will be backed by fault-tolerant data structures.
org.vertx.java.core.logging.Logger logger()
Component start()
ComponentCoordinator
to retrieve its context from the current cluster context. This means that
input and output connections are not set up until the component has been started.Component start(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Component>> doneHandler)
When the component is started, the component will use a ComponentCoordinator
to retrieve its context from the current cluster context. This means that
input and output connections are not set up until the component has been started.
doneHandler - An asynchronous handler to be called once the component is started.Copyright © 2013-2014. All Rights Reserved.