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
GatewayAddedEventListener s. |
GatewayRemovedEventManager |
getGatewayRemoved()
Returns an event manager allowing to register
GatewayRemovedEventListener s. |
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, wait
forEach, spliterator
public DefaultGateways(DefaultAdmin admin)
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public Gateway[] getGateways()
Gateways
getGateways
in interface Gateways
public Gateway getGateway(String gatewayName)
Gateways
Gateway
for the given gateway name. Returns null
if the
gateway is not currently discovered.getGateway
in interface Gateways
public Map<String,Gateway> getNames()
Gateways
Gateway
keyed by their respective names.public Gateway waitFor(String gatewayName)
Gateways
Admin.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)
Gateways
Gateway
. Return null
if the gateway is not
deployed within the specified timeout.public int getSize()
Gateways
public boolean isEmpty()
Gateways
true
if there are no gateways, false
otherwise.public GatewayAddedEventManager getGatewayAdded()
Gateways
GatewayAddedEventListener
s.getGatewayAdded
in interface Gateways
public GatewayRemovedEventManager getGatewayRemoved()
Gateways
GatewayRemovedEventListener
s.getGatewayRemoved
in interface Gateways
public void addLifecycleListener(GatewayLifecycleEventListener eventListener)
Gateways
GatewayLifecycleEventListener
.addLifecycleListener
in interface Gateways
public void removeLifecycleListener(GatewayLifecycleEventListener eventListener)
Gateways
GatewayLifecycleEventListener
.removeLifecycleListener
in interface Gateways
public void addGateway(Gateway gateway)
addGateway
in interface InternalGateways
public Gateway removeGateway(String name)
removeGateway
in interface InternalGateways
Copyright © GigaSpaces.