com.pcbsys.nirvana.nAdminAPI.nZoneManager Class Reference

Represents a Zone manager. More...

Inherits com.pcbsys.nirvana.nAdminAPI.nPkgCloseListener.

Public Member Functions

void close ()
 Releases any resources allocated by this zone manager.
 
nZone getZone ()
 
boolean joinZone (nZone zone) throws nAdminIllegalArgumentException, nBaseClientException
 The Realm of this ZoneManager will attempt to join the given Zone. More...
 
boolean leaveZone (nZone zone) throws nAdminIllegalArgumentException, nBaseClientException
 The Realm of this ZoneManager will attempt to leave the given Zone. More...
 

Static Public Member Functions

static nZone createZone (String zoneName)
 Creates a new Zone object with the given name and a globally unique identifier. More...
 

Detailed Description

Represents a Zone manager.

Member Function Documentation

static nZone com.pcbsys.nirvana.nAdminAPI.nZoneManager.createZone ( String  zoneName)
static

Creates a new Zone object with the given name and a globally unique identifier.

Zones may have the same name, but different unique identifiers which differentiate them from each other.

Parameters
zoneNameThe String value for the Zone name.
Returns
A Zone object with the given name and a randomly generated unique identifier.
nZone com.pcbsys.nirvana.nAdminAPI.nZoneManager.getZone ( )
Returns
The Zone that this realm is a member of, if any. Otherwise returns null.
boolean com.pcbsys.nirvana.nAdminAPI.nZoneManager.joinZone ( nZone  zone) throws nAdminIllegalArgumentException, nBaseClientException

The Realm of this ZoneManager will attempt to join the given Zone.

If the Realm is already a member of a Zone, or if the Zone specified is not valid then this method will throw an Exception.

Parameters
zoneThe Zone to join.
Returns
True if joining the zone is successful.
Exceptions
nAdminIllegalArgumentExceptionIf the Realm is already a member of another Zone then this exception will be thrown.
nBaseClientExceptionIf there was some problem in applying the joinZone operation then this exception will be thrown.
boolean com.pcbsys.nirvana.nAdminAPI.nZoneManager.leaveZone ( nZone  zone) throws nAdminIllegalArgumentException, nBaseClientException

The Realm of this ZoneManager will attempt to leave the given Zone.

If the Realm is not a member of this Zone, or if the Zone specified is not valid then this method will throw an Exception.

Parameters
zoneThe Zone to leave.
Returns
True is the Realm successfully leaves the given Zone. False if the operation was not attempted as the underlying connection is down
Exceptions
nAdminIllegalArgumentExceptionIf the Realm is not a member of a Zone, or is a member of a different Zone then this exception will be thrown.
nBaseClientExceptionIf there was some problem in applying the leaveZone operation then this exception will be thrown.