com.pcbsys.nirvana.nAdminAPI.nZoneManager Class Reference

Represents a Zone manager More...

Inherits com.pcbsys.nirvana.nAdminAPI.nPkgCloseListener.

Public Member Functions

virtual void closed (nRealmNode realmNode)
 Called when the nRealmNode is closed, for internal use only. More...
 
nZone getZone ()
 
bool joinZone (nZone zone)
 The Realm of this ZoneManager will attempt to join the given Zone. More...
 
bool leaveZone (nZone zone)
 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

virtual void com.pcbsys.nirvana.nAdminAPI.nZoneManager.closed ( nRealmNode  realmNode)
virtual

Called when the nRealmNode is closed, for internal use only.

Parameters
nodeThe nRealmNode which has been closed
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
bool com.pcbsys.nirvana.nAdminAPI.nZoneManager.joinZone ( nZone  zone)

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
bool com.pcbsys.nirvana.nAdminAPI.nZoneManager.leaveZone ( nZone  zone)

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