public interface ComponentContext<T extends ComponentContext<T>> extends Context<T>
Contexts are immutable as they are constructed once a network has been deployed.
The component context is not actually used by any Vertigo object, but is a
wrapper around multiple InstanceContext instances, with each instance
representing an instance of the component - a Vert.x verticle or module.
See ModuleContext and VerticleContext for module and verticle
specific configuration options respectively.
| Modifier and Type | Method and Description |
|---|---|
String |
address()
Gets the unique component address.
|
ModuleContext |
asModule()
Returns the component context as a module context.
|
VerticleContext |
asVerticle()
Returns the component context as a verticle context.
|
org.vertx.java.core.json.JsonObject |
config()
Gets the component configuration.
|
String |
group()
Returns the component deployment group.
|
List<ComponentHook> |
hooks()
Returns a list of component hooks.
|
InstanceContext |
instance(int instanceNumber)
Gets a component instance context by instance ID.
|
InstanceContext |
instance(String address)
Gets a component instance context by instance address.
|
List<InstanceContext> |
instances()
Gets a list of all component instance contexts.
|
boolean |
isModule()
Returns a boolean indicating whether the component is a module.
|
boolean |
isVerticle()
Returns a boolean indicating whether the component is a verticle.
|
String |
name()
Reurns the component name.
|
NetworkContext |
network()
Returns the parent network context.
|
int |
numInstances()
Returns the number of component instances.
|
String |
status()
Returns the component status address.
|
notify, registerObserver, unregisterObserverString name()
String address()
address in interface Context<T extends ComponentContext<T>>String status()
boolean isModule()
boolean isVerticle()
org.vertx.java.core.json.JsonObject config()
List<InstanceContext> instances()
int numInstances()
InstanceContext instance(int instanceNumber)
id - The instance ID.null if the instance doesn't exist.InstanceContext instance(String address)
address - The instance address.null if the instance doesn't exist.String group()
List<ComponentHook> hooks()
ModuleContext asModule()
VerticleContext asVerticle()
NetworkContext network()
Copyright © 2013-2014. All Rights Reserved.