public class DefaultGateways extends Object implements InternalGateways
| Constructor and Description |
|---|
DefaultGateways(DefaultAdmin admin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGateway(Gateway gateway) |
void |
addLifecycleListener(GatewayLifecycleEventListener eventListener)
Allows to add a
GatewayLifecycleEventListener. |
Admin |
getAdmin()
Returns the
Admin associated with this element. |
Gateway |
getGateway(String gatewayName)
Returns the
Gateway for the given gateway name. |
GatewayAddedEventManager |
getGatewayAdded()
Returns an event manager allowing to register
GatewayAddedEventListeners. |
GatewayRemovedEventManager |
getGatewayRemoved()
Returns an event manager allowing to register
GatewayRemovedEventListeners. |
Gateway[] |
getGateways()
Returns all the currently discovered gateways.
|
Map<String,Gateway> |
getNames()
Returns a map of
Gateway keyed by their respective names. |
int |
getSize()
Returns the number of gateways currently discovered.
|
boolean |
isEmpty()
Returns
true if there are no gateways, false otherwise. |
Iterator<Gateway> |
iterator() |
Gateway |
removeGateway(String name) |
void |
removeLifecycleListener(GatewayLifecycleEventListener eventListener)
Allows to remove a
GatewayLifecycleEventListener. |
Gateway |
waitFor(String gatewayName)
Waits for the default timeout specified by
Admin.setDefaultTimeout(long, TimeUnit)
till the gateway is identified as deployed. |
Gateway |
waitFor(String gatewayName,
long timeout,
TimeUnit timeUnit)
Waits for the specified timeout (in time interval) till the gateway is identified as
deployed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultGateways(DefaultAdmin admin)
public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic Gateway[] getGateways()
GatewaysgetGateways in interface Gatewayspublic Gateway getGateway(String gatewayName)
GatewaysGateway for the given gateway name. Returns null if the
gateway is not currently discovered.getGateway in interface Gatewayspublic Map<String,Gateway> getNames()
GatewaysGateway keyed by their respective names.public Gateway waitFor(String gatewayName)
GatewaysAdmin.setDefaultTimeout(long, TimeUnit)
till the gateway is identified as deployed. Return null if the gateway is not
deployed within the specified timeout.public Gateway waitFor(String gatewayName, long timeout, TimeUnit timeUnit)
GatewaysGateway. Return null if the gateway is not
deployed within the specified timeout.public int getSize()
Gatewayspublic boolean isEmpty()
Gatewaystrue if there are no gateways, false otherwise.public GatewayAddedEventManager getGatewayAdded()
GatewaysGatewayAddedEventListeners.getGatewayAdded in interface Gatewayspublic GatewayRemovedEventManager getGatewayRemoved()
GatewaysGatewayRemovedEventListeners.getGatewayRemoved in interface Gatewayspublic void addLifecycleListener(GatewayLifecycleEventListener eventListener)
GatewaysGatewayLifecycleEventListener.addLifecycleListener in interface Gatewayspublic void removeLifecycleListener(GatewayLifecycleEventListener eventListener)
GatewaysGatewayLifecycleEventListener.removeLifecycleListener in interface Gatewayspublic void addGateway(Gateway gateway)
addGateway in interface InternalGatewayspublic Gateway removeGateway(String name)
removeGateway in interface InternalGatewaysCopyright © GigaSpaces.