This class represents the Nirvana Channel or Queue on the Nirvana Realm. More...
#include <nLeafNode.h>
Public Member Functions | |
void | addACLEntries (nACL *pEntries) |
Adds a specific acl entry to the leaf node acl. More... | |
void | addACLEntry (nACLEntry *pEntry) |
Adds a specific acl entry to the leaf node acl. More... | |
virtual void | addListener (nAPIConnectionListener *pListener) |
Registers the listener object with the channel/queue so that whenever a connection is made or lost with the channel such as a subscriber is added the listener is notified of the change in state of the channel. More... | |
void | archiveJoin (nNode *pToNode, const std::string &selector) |
This method enables the joining of the object from one node to another, specifying a selector for filtered joins. More... | |
virtual void | closed (nRealmNode *pClose) |
Called when the nRealmNode is closed. More... | |
virtual void | copy (nNode *pToNode, std::string &toName, bool bWaitForCompletion, nACL *pAcl, nCommandStatus *pCmdStatus) |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within the nRealmNode passed as a parameter, with the specified channel name. More... | |
virtual void | copy (std::string &toName, bool bWaitForCompletion, nACL *pAcl, nCommandStatus *pCmdStatus) |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within same realm with the specified channel name. More... | |
virtual void | copy (nNode *pToNode, bool bWaitForCompletion, nChannelAttributes *pAttrib, nACL *pAcl, nCommandStatus *pCmdStatus) |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within the nRealmNode passed as a parameter, with the specified channel attributes. More... | |
virtual void | copy (bool bWaitForCompletion, nChannelAttributes *pAttrib, nACL *pAcl, nCommandStatus *pCmdStatus) |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within the same realm node with the specified channel attributes. More... | |
virtual nACLEntry * | createACLEntry (const std::string &subject, BitArray *pBs) |
Adds a specific acl entry to the leaf node acl. More... | |
virtual nACLEntry * | createACLEntry (nSecurityGroup *grp, BitArray *pBs) |
This method creates an ACL entry. More... | |
virtual void | deleteJoin (nNode *pNode) |
This method deletes the join between nodes. More... | |
virtual void | delListener () |
Removes the registered listener from the channel so no further callbacks are made to the listener. More... | |
virtual void | freeUnusedSpace () |
Requests that the Realm frees the unused space within this channel/queue. More... | |
const std::string & | getAbsolutePath () |
This function walks the tree to the root to generate a fully qualified name for this node. More... | |
virtual nACL * | getACLs () |
Retrieves the channel/queues ACLs which can then be modified and committed with the setACLs() function. More... | |
virtual nChannelAttributes * | getAttributes () |
Returns the channel attributes for this channel/queue. More... | |
virtual double | getCacheHitRatio () |
Retreives the channel/queues cache ratio. More... | |
virtual double | getConnectionRate () |
The number of subscriptions made to this store per second. More... | |
virtual double | getConsumedRate () |
The number of events published per second. More... | |
virtual longlong | getCurrentNoOfConnections () |
Retrieves the current number of connections to this channel. More... | |
virtual longlong | getCurrentNumberOfEvents () |
Returns the number of events within the channel/queue. More... | |
virtual longlong | getFanoutTime () |
The total number of milliseconds it takes to fanout each event to all consumers. More... | |
virtual std::map< nLeafNode *, nJoinDetails * > & | getInboundJoins () |
Returns a map of nJoinDetails objects containing information about channels sending events to this channel. More... | |
virtual longlong | getLastEID () |
Returns the last EID that was used for the channel/queue. More... | |
virtual int | getOutboundJoinCount () |
Returns a count of outbound joins this channel has. More... | |
virtual std::map< std::string, nJoinDetails * > & | getOutboundJoins () |
Returns a map of nJoinDetails objects containing information about channels that this channel will pass events to. More... | |
virtual int | getPercentageFreeInStore () |
Returns the amount of free space within a store as a percentage of the overall space used. More... | |
virtual double | getPublishRate () |
The number of events published per second. More... | |
virtual nRealmNode * | getRealm () |
Returns the Realm Node this leaf node is associated with. More... | |
virtual longlong | getTotalConsumed () |
Returns the total number of events that this channel has delivered to subscribers. More... | |
virtual longlong | getTotalNoOfConnections () |
Returns the total number of connections that this channel has had since the realm started. More... | |
virtual longlong | getTotalPublished () |
Returns the total number of events published/pushed to this channel/queue since the realm has started. More... | |
virtual longlong | getUsedSpace () |
Returns the number of bytes that this channel/queue consumes on the server. More... | |
virtual bool | isChannel () |
Returns true if this node is a channel. More... | |
virtual bool | isClusterWide () |
Returns true if this represents a nirvana channel or queue that is part of a cluster. More... | |
virtual bool | isQueue () |
Returns true if this node is a queue. More... | |
virtual bool | IsRemovable () |
Returns true if this node is removable. More... | |
virtual void | join (nNode *pToNode, bool bIsRouted, int hopcount, const std::string &selector) |
This method enables the joining of the object from one node to another, specifying a selector, and a maximum hop count for the events. More... | |
virtual void | join (nNode *pToNode, bool bIsRouted, int hopcount, const std::string &selector, bool allowPurge) |
This method enables the joining of the object from one node to another, specifying a selector, and a maximum hop count for the events. More... | |
virtual void | join (nNode *pToNode, const std::string &selector) |
This method enables the joining of the object from one node to another, specifying a selector for filtered joins. More... | |
void | modACLEntries (nACL *pEntries) |
modifies a specific acl entry's permissions in the leaf node acl. More... | |
void | modACLEntry (nACLEntry *pEntry) |
modifies a specific acl entry's permissions in the leaf node acl. More... | |
nLeafNode (const std::string &name, nSecureChannel *pChannel, nNode *pParent) | |
Creates a new nLeafNode. More... | |
virtual void | remove (bool removeChildren) |
This method removes this nLeafNode (channel or queue) from its parent nRealmNode. More... | |
void | removeACLEntries (nACL *pEntries) |
removes a specific acl entry from the leaf node acl. More... | |
void | removeACLEntry (nACLEntry *pEntry) |
removes a specific acl entry from the leaf node acl. More... | |
virtual void | setACLs (nACL *pAcl) |
Commits the ACL passed in with the Realm Server. More... | |
Public Member Functions inherited from com::pcbsys::nirvana::nAdminAPI::nNode | |
virtual BitArray * | convertLong (longlong priv) |
Converts from a long to a bitArray used to specify ACL properties. More... | |
virtual bool | Equals (nNode *pItem) |
Check if this nNode is the same as the nNode passed in. More... | |
virtual bool | Equals (const std::string &item) |
Check if the string passed in matches the name of this nNode. More... | |
const std::string & | getInternalName () |
Returns the name of this nNode. More... | |
const std::string & | getName () |
Returns the name of the node. More... | |
virtual nNode * | getParent () |
Returns this nodes parent node. More... | |
virtual std::string | getRelativePath (nNode *pTop) |
This method returns the relative path from this node to the nNode passed. More... | |
This class represents the Nirvana Channel or Queue on the Nirvana Realm.
The super class is nNode which implements Observable. When any details change for this object any registered Observers are notified with the change. The status functions may return 0 until the status events are received from the server.
com::pcbsys::nirvana::nAdminAPI::nLeafNode::nLeafNode | ( | const std::string & | name, |
nSecureChannel * | pChannel, | ||
nNode * | pParent | ||
) |
void com::pcbsys::nirvana::nAdminAPI::nLeafNode::addACLEntries | ( | nACL * | pEntries | ) |
Adds a specific acl entry to the leaf node acl.
*pEntries | An nACL list containing the subjects and permissions to add to the leaf node acl |
nInsufficientPrivilegesException | If the user is not permitted to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |
void com::pcbsys::nirvana::nAdminAPI::nLeafNode::addACLEntry | ( | nACLEntry * | pEntry | ) |
Adds a specific acl entry to the leaf node acl.
*pEntry | An nACL entry containing the subject and permissions to add to the leaf node acl |
nInsufficientPrivilegesException | If the user is not permitted to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |
|
virtual |
Registers the listener object with the channel/queue so that whenever a connection is made or lost with the channel such as a subscriber is added the listener is notified of the change in state of the channel.
Currently only one listener per session is supported.
*pListener | the connection listener to be added to the leaf node (channel or queue) |
nBaseAdminException | if the user is not permitted to access these lists, check the message for further information |
void com::pcbsys::nirvana::nAdminAPI::nLeafNode::archiveJoin | ( | nNode * | pToNode, |
const std::string & | selector | ||
) |
This method enables the joining of the object from one node to another, specifying a selector for filtered joins.
*pToNode | the nNode object to join this node to |
selector | the filter to be applied to the join |
nUnsupportedJoinException | thrown if join is not supported (e.g. on queues) |
nBaseAdminException | is thrown if the join creation fails |
|
virtual |
Called when the nRealmNode is closed.
*pNode | The nRealmNode which has been closed. |
|
virtual |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within the nRealmNode passed as a parameter, with the specified channel name.
Using this method, allows nLeafNodes to be copied to other realms within the namespace
The channel name used for the new copied nLeafNode must be unique in the destination realm
*pToNode | The nRealmNode to copy the channel to |
toName | The name of the new nLeafNode (channel or queue) |
bWaitForCompletion | Specifies whether the method returns before copy operation has completed |
*pAcl | an optional initial acl object that will be set on the object being copied |
*pCmdStatus | an optional nCommandStatus object that will inform you of the operation status |
nUnsupportedCopyException | Thrown if copy is not supported |
Implements com::pcbsys::nirvana::nAdminAPI::nCopyable.
|
virtual |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within same realm with the specified channel name.
The channel name used for the new copied nLeafNode must be unique in the realm
toName | The name of the new nLeafNode (channel or queue) |
bWaitForCompletion | Specifies whether the method returns before copy operation has completed |
*pAcl | an optional initial acl object that will be set on the object being copied |
*pCmdStatus | an optional nCommandStatus object that will inform you of the operation status |
nUnsupportedCopyException | Thrown if copy is not supported |
Implements com::pcbsys::nirvana::nAdminAPI::nCopyable.
|
virtual |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within the nRealmNode passed as a parameter, with the specified channel attributes.
Using this method, allows nLeafNodes to be copied to other realms within the namespace
Attributes can be different on the copied channel, such as ttl, capacity and type
*pToNode | The nRealmNode to copy the channel to |
bWaitForCompletion | Specifies whether the method returns before copy operation has completed |
*pAttrib | The channel attributes of the new nLeafNode |
*pAcl | an optional initial acl object that will be set on the object being copied |
*pCmdStatus | an optional nCommandStatus object that will inform you of the operation status |
nUnsupportedCopyException | Thrown if copy is not supported |
Implements com::pcbsys::nirvana::nAdminAPI::nCopyable.
|
virtual |
Copies this nLeafNode (channel or queue) to a new nLeafNode (channel or queue) within the same realm node with the specified channel attributes.
Attributes can be different on the copied channel, such as ttl, capacity and type
bWaitForCompletion | Specifies whether the method returns before copy operation has completed |
*pAttrib | The channel attributes of the new nLeafNode |
*pAcl | an optional initial acl object that will be set on the object being copied |
*pCmdStatus | an optional nCommandStatus object that will inform you of the operation status |
nUnsupportedCopyException | Thrown if copy is not supported |
Implements com::pcbsys::nirvana::nAdminAPI::nCopyable.
|
virtual |
Adds a specific acl entry to the leaf node acl.
*pEntries | An nACL list containing the subjects and permissions to add to the leaf node acl |
nInsufficientPrivilegesException | If the user is not permissioned to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |
Reimplemented from com::pcbsys::nirvana::nAdminAPI::nNode.
|
virtual |
This method creates an ACL entry.
grp | the security group to create the ACL for |
*pBs | the BitArray representing the ACL settings to use. |
Exception | If the name space is not completed with in the time specified |
Reimplemented from com::pcbsys::nirvana::nAdminAPI::nNode.
|
virtual |
This method deletes the join between nodes.
This is only supported where the source node is a channel
pNode | the nNode object this node is joined to |
nUnsupportedJoinException | thrown if join is not supported (e.g. from queues) |
nBaseAdminException | is thrown if the join deletion fails |
|
virtual |
Removes the registered listener from the channel so no further callbacks are made to the listener.
nBaseAdminException | if the user is not permitted to access these lists |
|
virtual |
Requests that the Realm frees the unused space within this channel/queue.
If the Channel/Queue has a large number of events it could take some time to perform. It is recommended to do this during quiet periods.
nBaseClientException | If the user does not have the permission to request this |
|
virtual |
This function walks the tree to the root to generate a fully qualified name for this node.
Reimplemented from com::pcbsys::nirvana::nAdminAPI::nNode.
|
virtual |
Retrieves the channel/queues ACLs which can then be modified and committed with the setACLs() function.
nBaseAdminException | If this user is not permitted to view this data |
|
virtual |
Returns the channel attributes for this channel/queue.
|
virtual |
Retreives the channel/queues cache ratio.
This ratio represents the (number of cache hits)/(Total Access). This cache is only active when the channel/queue is a persistant store and the server caches the event instead of re-reading it from the store again.
|
virtual |
The number of subscriptions made to this store per second.
|
virtual |
The number of events published per second.
|
virtual |
Retrieves the current number of connections to this channel.
|
virtual |
Returns the number of events within the channel/queue.
|
virtual |
The total number of milliseconds it takes to fanout each event to all consumers.
|
virtual |
Returns a map of nJoinDetails objects containing information about channels sending events to this channel.
|
virtual |
Returns the last EID that was used for the channel/queue.
|
virtual |
|
virtual |
Returns a map of nJoinDetails objects containing information about channels that this channel will pass events to.
|
virtual |
Returns the amount of free space within a store as a percentage of the overall space used.
|
virtual |
The number of events published per second.
|
virtual |
Returns the Realm Node this leaf node is associated with.
Please note this might not be the root of the namespace but a federated realm.
|
virtual |
Returns the total number of events that this channel has delivered to subscribers.
|
virtual |
Returns the total number of connections that this channel has had since the realm started.
|
virtual |
Returns the total number of events published/pushed to this channel/queue since the realm has started.
|
virtual |
Returns the number of bytes that this channel/queue consumes on the server.
|
virtual |
Returns true if this node is a channel.
|
virtual |
Returns true if this represents a nirvana channel or queue that is part of a cluster.
|
virtual |
Returns true if this node is a queue.
|
virtual |
Returns true if this node is removable.
Reimplemented from com::pcbsys::nirvana::nAdminAPI::nNode.
|
virtual |
This method enables the joining of the object from one node to another, specifying a selector, and a maximum hop count for the events.
This is only supported on channel objects.
*pToNode | the nNode object to join this node to |
bIsRouted | Reserved for future use. |
hopcount | if an event is published directly to this node (i.e. does not arrive here through another join), this is the maximum number of hops it will follow |
selector | a message selector specifying a filter for this message route |
nUnsupportedJoinException | thrown if join is not supported (e.g. on queues) |
nBaseAdminException | is thrown if the join creation fails |
Implements com::pcbsys::nirvana::nAdminAPI::nJoinable.
|
virtual |
This method enables the joining of the object from one node to another, specifying a selector, and a maximum hop count for the events.
This is only supported on channel objects.
*pToNode | the nNode object to join this node to |
bIsRouted | Reserved for future use. |
hopcount | if an event is published directly to this node (i.e. does not arrive here through another join), this is the maximum number of hops it will follow |
selector | a message selector specifying a filter for this message route |
allowPurge | whether purges will be propagated to the joined channel |
nUnsupportedJoinException | thrown if join is not supported (e.g. on queues) |
nBaseAdminException | is thrown if the join creation fails |
Implements com::pcbsys::nirvana::nAdminAPI::nJoinable.
|
virtual |
This method enables the joining of the object from one node to another, specifying a selector for filtered joins.
*pToNode | the nNode object to join this node to |
selector | the filter to be applied to the join |
nUnsupportedJoinException | thrown if join is not supported (e.g. on queues) |
nBaseAdminException | is thrown if the join creation fails |
Implements com::pcbsys::nirvana::nAdminAPI::nJoinable.
void com::pcbsys::nirvana::nAdminAPI::nLeafNode::modACLEntries | ( | nACL * | pEntries | ) |
modifies a specific acl entry's permissions in the leaf node acl.
*pEntries | An nACL entry containing the subject and permissions to modify in the leaf node acl |
nInsufficientPrivilegesException | If the user is not permitted to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |
void com::pcbsys::nirvana::nAdminAPI::nLeafNode::modACLEntry | ( | nACLEntry * | pEntry | ) |
modifies a specific acl entry's permissions in the leaf node acl.
*pEntry | An nACL entry containing the subject and permissions to modify in the leaf node acl |
nInsufficientPrivilegesException | If the user is not permitted to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |
|
virtual |
This method removes this nLeafNode (channel or queue) from its parent nRealmNode.
removeChildren | a boolean specifying whether siblings should be removed too. Specify false, as nLeafNodes do not have children |
nUnsupportedRemoveException | thrown if join is not supported (e.g. on queues) |
nNodeException | is thrown if an error occurs in the remove operation |
Implements com::pcbsys::nirvana::nAdminAPI::nRemovable.
void com::pcbsys::nirvana::nAdminAPI::nLeafNode::removeACLEntries | ( | nACL * | pEntries | ) |
removes a specific acl entry from the leaf node acl.
*pEntries | An nACL list containing the subjects and permissions to remove from the leaf node acl |
nInsufficientPrivilegesException | If the user is not permitted to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |
void com::pcbsys::nirvana::nAdminAPI::nLeafNode::removeACLEntry | ( | nACLEntry * | pEntry | ) |
removes a specific acl entry from the leaf node acl.
*pEntry | An nACL entry containing the subject and permissions to remove from the leaf node acl |
nInsufficientPrivilegesException | If the user is not permitted to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |
|
virtual |
Commits the ACL passed in with the Realm Server.
This causes these ACLs to be active once the function returns. The nACL object can be retrieved by calling the getACLs() function which returns the channel/queues current list.
*pAcl | A nACL containing nChannelACLEntry |
nInsufficientPrivilegesException | If the user is not permitted to perform this operation |
nNodeException | if the ACLs being set are invalid |
nBaseAdminException | if unable to perform the operation, check the message for further information |