PortForwardManager, or a direct reference to its impl PortForwardManagerImpl@Deprecated public class PortForwardManagerClient extends java.lang.Object implements PortForwardManager
PortForwardManager.AssociationListener, PortForwardManager.AssociationMetadataBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportPORT_FORWARD_MANAGER_STARTING_PORT, SCOPE| Modifier and Type | Method and Description |
|---|---|
int |
acquirePublicPort(java.lang.String publicIpId)
Deprecated.
Reserves a unique public port on the given publicIpId.
|
void |
addAssociationListener(PortForwardManager.AssociationListener listener,
<any> filter)
Deprecated.
Registers a listener, which will be notified each time a new port mapping is associated.
|
void |
associate(java.lang.String publicIpId,
HostAndPort publicEndpoint,
int privatePort)
Deprecated.
Records a mapping for publicIpId:privatePort to a public endpoint, such that it can
subsequently be looked up using
PortForwardManager.lookup(String, int). |
void |
associate(java.lang.String publicIpId,
HostAndPort publicEndpoint,
Location l,
int privatePort)
Deprecated.
Records a location and private port against a public endpoint (ip and port),
to support
PortForwardManager.lookup(Location, int). |
Configurable.ConfigurationSupport |
config()
Deprecated.
|
boolean |
containsLocation(Location potentialDescendent)
Deprecated.
Answers true if this location equals or is an ancestor of the given location.
|
boolean |
forgetPortMapping(PortMapping m)
Deprecated.
since 0.7.0; this method will be internal only
|
boolean |
forgetPortMapping(java.lang.String publicIpId,
int publicPort)
Deprecated.
Clears the given port mapping, returning true if there was a match.
|
boolean |
forgetPortMappings(Location location)
Deprecated.
Clears the port mappings associated with the given location, returning true if there were any matches.
|
boolean |
forgetPortMappings(java.lang.String publicIpId)
Deprecated.
Clears the port mappings associated with the given publicIpId, returning true if there were any matches.
|
static PortForwardManager |
fromAttributeOnEntity(Entity entity,
AttributeSensor<PortForwardManager> attributeOnEntity)
Deprecated.
creates an instance given an entity and
AttributeSensor to retrieve the PortForwardManager |
static PortForwardManager |
fromMethodOnEntity(Entity entity,
java.lang.String getterMethodOnEntity)
Deprecated.
creates an instance given an entity and an interface method it implements to retrieve the PortForwardManager
|
static PortForwardManager |
fromSupplier(<any> supplier)
Deprecated.
creates an instance given a supplier;
the supplier should be brooklyn-persistable, that is to say
references should be in terms of entities/locations
which can retrieve an authoritative source even under cloning
|
java.lang.String |
getCatalogItemId()
Deprecated.
The catalog item ID this object was loaded from.
|
java.util.List<java.lang.String> |
getCatalogItemIdSearchPath()
Deprecated.
An immutable list of ids of catalog items that this item depends on in some way,
with the item that directly defines it implicit, but other items it references explicit.
|
java.util.Collection<Location> |
getChildren()
Deprecated.
Get the 'children' of this location.
|
<T> T |
getConfig(ConfigKey.HasConfigKey<T> key)
Deprecated.
Convenience method for
config().get(key) |
<T> T |
getConfig(ConfigKey<T> key)
Deprecated.
Convenience for calling
Configurable.ConfigurationSupport.get(ConfigKey),
via code like config().get(key). |
java.lang.String |
getDisplayName()
Deprecated.
Get the name assigned to this location.
|
<T> T |
getExtension(java.lang.Class<T> extensionType)
Deprecated.
Returns an extension of the given type.
|
java.lang.String |
getId()
Deprecated.
A unique id for this location.
|
java.util.Collection<PortMapping> |
getLocationPublicIpIds(Location l)
Deprecated.
since 0.7.0; this method will be internal only
|
Location |
getParent()
Deprecated.
Get the 'parent' of this location.
|
PortMapping |
getPortMappingWithPrivateSide(Location l,
int privatePort)
Deprecated.
since 0.7.0; this method will be internal only
|
java.util.Collection<PortMapping> |
getPortMappingWithPublicIpId(java.lang.String publicIpId)
Deprecated.
since 0.7.0; this method will be internal only
|
PortMapping |
getPortMappingWithPublicSide(java.lang.String publicIpId,
int publicPort)
Deprecated.
since 0.7.0; this method will be internal only
|
HostAndPort |
getPublicHostAndPort(PortMapping m)
Deprecated.
since 0.7.0; this method will be internal only
|
java.lang.String |
getScope()
Deprecated.
|
boolean |
hasExtension(java.lang.Class<?> extensionType)
Deprecated.
Whether this location has support for the given extension type.
|
HostAndPort |
lookup(Location l,
int privatePort)
Deprecated.
Returns the public ip hostname and public port for use contacting the given endpoint.
|
HostAndPort |
lookup(java.lang.String publicIpId,
int privatePort)
Deprecated.
Returns the public endpoint (host and port) for use contacting the given endpoint.
|
BrooklynObject.RelationSupport<Location> |
relations()
Deprecated.
Relations specify a typed, directed connection between two entities.
|
void |
removeAssociationListener(PortForwardManager.AssociationListener listener)
Deprecated.
|
void |
setParent(Location newParent)
Deprecated.
Set the 'parent' of this location.
|
BrooklynObject.SubscriptionSupport |
subscriptions()
Deprecated.
Subscriptions are the mechanism for receiving notifications of sensor-events (e.g.
|
BrooklynObject.TagSupport |
tags()
Deprecated.
Tags are arbitrary objects which can be attached to an entity for subsequent reference.
|
java.lang.String |
toString()
Deprecated.
|
java.lang.String |
toVerboseString()
Deprecated.
|
public static PortForwardManager fromSupplier(<any> supplier)
public static PortForwardManager fromMethodOnEntity(Entity entity, java.lang.String getterMethodOnEntity)
public static PortForwardManager fromAttributeOnEntity(Entity entity, AttributeSensor<PortForwardManager> attributeOnEntity)
AttributeSensor to retrieve the PortForwardManagerpublic int acquirePublicPort(java.lang.String publicIpId)
PortForwardManager
Often followed by PortForwardManager.associate(String, HostAndPort, int) or PortForwardManager.associate(String, HostAndPort, Location, int)
to enable PortForwardManager.lookup(String, int) or PortForwardManager.lookup(Location, int) respectively.
acquirePublicPort in interface PortForwardManagerpublic void associate(java.lang.String publicIpId,
HostAndPort publicEndpoint,
Location l,
int privatePort)
PortForwardManagerPortForwardManager.lookup(Location, int).
Superfluous if #acquirePublicPort(String, Location, int) was used,
but strongly recommended if #acquirePublicPortExplicit(String, int) was used
e.g. if the location is not known ahead of time.
associate in interface PortForwardManagerpublic void associate(java.lang.String publicIpId,
HostAndPort publicEndpoint,
int privatePort)
PortForwardManagerPortForwardManager.lookup(String, int).associate in interface PortForwardManagerpublic HostAndPort lookup(Location l, int privatePort)
PortForwardManagerWill return null if:
lookup in interface PortForwardManager#recordPublicIpHostname(String, String)public HostAndPort lookup(java.lang.String publicIpId,
int privatePort)
PortForwardManagerPortForwardManager.associate(String, HostAndPort, int), to register
the endpoint.
Will return null if there has not been a public endpoint associated with this pairing.lookup in interface PortForwardManagerpublic boolean forgetPortMapping(java.lang.String publicIpId,
int publicPort)
PortForwardManagerforgetPortMapping in interface PortForwardManagerpublic boolean forgetPortMappings(Location location)
PortForwardManagerforgetPortMappings in interface PortForwardManagerpublic boolean forgetPortMappings(java.lang.String publicIpId)
PortForwardManagerforgetPortMappings in interface PortForwardManagerpublic java.lang.String getId()
LocationgetId in interface LocationgetId in interface Identifiablepublic java.lang.String getScope()
getScope in interface PortForwardManagerpublic void addAssociationListener(PortForwardManager.AssociationListener listener, <any> filter)
PortForwardManagerPortForwardManager.associate(String, HostAndPort, int)
and PortForwardManager.associate(String, HostAndPort, Location, int).addAssociationListener in interface PortForwardManagerpublic void removeAssociationListener(PortForwardManager.AssociationListener listener)
removeAssociationListener in interface PortForwardManagerpublic java.lang.String toVerboseString()
toVerboseString in interface LocationtoVerboseString in interface PortForwardManager@Deprecated public PortMapping getPortMappingWithPublicSide(java.lang.String publicIpId, int publicPort)
getPortMappingWithPublicSide in interface PortForwardManager@Deprecated public java.util.Collection<PortMapping> getPortMappingWithPublicIpId(java.lang.String publicIpId)
getPortMappingWithPublicIpId in interface PortForwardManager@Deprecated public boolean forgetPortMapping(PortMapping m)
forgetPortMapping in interface PortForwardManagerforgetPortMapping(String, int)@Deprecated public HostAndPort getPublicHostAndPort(PortMapping m)
Conceivably this may have to be access-location specific.
getPublicHostAndPort in interface PortForwardManager@Deprecated public java.util.Collection<PortMapping> getLocationPublicIpIds(Location l)
getLocationPublicIpIds in interface PortForwardManager@Deprecated public PortMapping getPortMappingWithPrivateSide(Location l, int privatePort)
getPortMappingWithPrivateSide in interface PortForwardManagerpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getDisplayName()
LocationgetDisplayName in interface LocationgetDisplayName in interface BrooklynObjectpublic Location getParent()
Locationnull if this location is the tree root.public java.util.Collection<Location> getChildren()
LocationgetChildren in interface Locationpublic void setParent(Location newParent)
Locationnull to indicate that the location should be disconnected
from its parent.
Adds this location as a child of the new parent (see getChildLocations()).public boolean containsLocation(Location potentialDescendent)
LocationcontainsLocation in interface Locationpublic <T> T getConfig(ConfigKey.HasConfigKey<T> key)
Locationconfig().get(key)public <T> T getConfig(ConfigKey<T> key)
ConfigurableConfigurable.ConfigurationSupport.get(ConfigKey),
via code like config().get(key).getConfig in interface Configurablepublic boolean hasExtension(java.lang.Class<?> extensionType)
LocationLocation.getExtension(Class).hasExtension in interface Locationpublic <T> T getExtension(java.lang.Class<T> extensionType)
LocationgetExtension(Object.class) will not match
anything, even though registered extension extend Object.
This will not look at extensions of Location.getParent().
getExtension in interface Locationpublic java.lang.String getCatalogItemId()
BrooklynObjectThis can be used to understand the appropriate classloading context, such as for versioning purposes, as well as meta-information such as branding (maybe you can even get an icon) and potentially things like resource lifecycle (if a software version is being sunsetted).
In some cases this may be set heuristically from context and so may not be accurate. Callers can set an explicit catalog item ID if inferencing is not correct.
This should conform to OSGi specs for symbolic_name:version
but weaker semantics are usually allowed so long as neither segment contains a : or whitespace.
getCatalogItemId in interface BrooklynObjectpublic java.util.List<java.lang.String> getCatalogItemIdSearchPath()
BrooklynObject
items:
- id: X
- id: Y
item: X
- id: Z
item: Y
the spec for Z will have getCatalogId() of Z and getCatalogItemIdSearchPath() of Y, X.
(The self catalog ID is implicit at the head of the search path.)getCatalogItemIdSearchPath in interface BrooklynObjectpublic BrooklynObject.TagSupport tags()
BrooklynObjectImmutableMap may be used under the covers; also there is little point!);
and they should be amenable to our persistence (on-disk serialization) and our JSON serialization in the REST API.tags in interface BrooklynObjectpublic BrooklynObject.RelationSupport<Location> relations()
BrooklynObjectrelations in interface Locationrelations in interface BrooklynObjectpublic Configurable.ConfigurationSupport config()
config in interface Configurablepublic BrooklynObject.SubscriptionSupport subscriptions()
BrooklynObjectsubscriptions in interface BrooklynObject