public class DefaultComponent extends Object implements Component
This component implementation simply handles startup of component inputs and outputs and provides an interface to access messaging APIs.
| Modifier and Type | Field and Description |
|---|---|
protected Cluster |
cluster |
protected org.vertx.java.platform.Container |
container |
protected InstanceContext |
context |
protected DefaultInputCollector |
input |
protected org.vertx.java.core.logging.Logger |
logger |
protected DefaultOutputCollector |
output |
protected org.vertx.java.core.Vertx |
vertx |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultComponent(InstanceContext context,
org.vertx.java.core.Vertx vertx,
org.vertx.java.platform.Container container,
Cluster cluster) |
| 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.
|
protected final org.vertx.java.core.Vertx vertx
protected final org.vertx.java.platform.Container container
protected final Cluster cluster
protected final org.vertx.java.core.logging.Logger logger
protected InstanceContext context
protected final DefaultInputCollector input
protected final DefaultOutputCollector output
protected DefaultComponent(InstanceContext context, org.vertx.java.core.Vertx vertx, org.vertx.java.platform.Container container, Cluster cluster)
public org.vertx.java.core.Vertx vertx()
Componentpublic org.vertx.java.platform.Container container()
Componentpublic InputCollector input()
ComponentInputCollector. This is the element of the
component which provides an interface for receiving messages from other components.input in interface ComponentInputCollector.public OutputCollector output()
ComponentOutputCollector. This is the element of the
component which provides an interface for sending messages to other components.output in interface ComponentOutputCollector.public InstanceContext context()
Componentpublic Cluster cluster()
ComponentThe 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.
public org.vertx.java.core.logging.Logger logger()
Componentpublic Component start()
ComponentComponentCoordinator
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.public Component start(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Component>> doneHandler)
Component
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.
Copyright © 2013-2014. All Rights Reserved.