public final class DefaultInstanceContext extends BaseContext<InstanceContext> implements InstanceContext
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultInstanceContext.Builder
Instance context builder.
|
address, observers, version| Modifier and Type | Method and Description |
|---|---|
String |
address()
Returns the instance address.
|
<T extends ComponentContext> |
component()
Returns the parent component context.
|
static DefaultInstanceContext |
fromJson(org.vertx.java.core.json.JsonObject context)
Creates a new instance context from JSON.
|
InputContext |
input()
Returns the instance input context.
|
void |
notify(InstanceContext update) |
int |
number()
Returns the instance number.
|
OutputContext |
output()
Returns the instance output context.
|
String |
status()
Returns the instance status address.
|
static org.vertx.java.core.json.JsonObject |
toJson(InstanceContext context)
Serializes an instance context to JSON.
|
String |
toString() |
copy, equals, hashCode, registerObserver, unregisterObserverclone, finalize, getClass, notify, notifyAll, wait, wait, waitregisterObserver, unregisterObserverpublic static DefaultInstanceContext fromJson(org.vertx.java.core.json.JsonObject context)
context - A JSON representation of the instance context.MalformedContextException - If the JSON context is malformed.public static org.vertx.java.core.json.JsonObject toJson(InstanceContext context)
context - The instance context to serialize.public int number()
InstanceContextnumber in interface InstanceContextpublic String address()
InstanceContextThis is simply a unique identifier used to identify the component across all networks.
address in interface InstanceContextaddress in interface Context<InstanceContext>public String status()
InstanceContextThe status address is used by the component instance to notify the network and other components within the network of its current status. This is used by the network manager to coordinate startup of components across a network.
status in interface InstanceContextpublic InputContext input()
InstanceContextinput in interface InstanceContextpublic OutputContext output()
InstanceContextoutput in interface InstanceContextpublic <T extends ComponentContext> T component()
InstanceContextcomponent in interface InstanceContextpublic void notify(InstanceContext update)
notify in interface Observable<InstanceContext>notify in class BaseContext<InstanceContext>public String toString()
toString in class BaseContext<InstanceContext>Copyright © 2013-2014. All Rights Reserved.