j2meClient.nObject Class Reference

A generic polymorphic class to represent all container/attribute/data classes in the J2SE Nirvana client API. More...


Public Member Functions

String toString ()
 Provides a String representation of this nObject instance.

Static Public Member Functions

static void abortTransaction (nObject transaction) throws Exception
 Aborts the transaction specified.
static void ack (nObject consumeevent) throws Exception
 Positively acknowledges the specified consume event for a named subscriber that was created WITHOUT auto acknowledge.
static nObject closeIterator (nObject iterator) throws Exception
 Create a channel iterator on the specified channel allowing synchronous reading of events using a named object.
static void closeSession (nObject session) throws Exception
 Closes the specified session making it physically disconnected with the Nirvana realm and stopping all background threads.
static void commitTransaction (nObject transaction) throws Exception
 Commits the transaction specified.
static nObject createChannel (nObject session, nObject channelattributes, long initialEID) throws Exception
 Creates a new channel on the realm this session is connected.
static nObject createChannelAttributes () throws Exception
 Creates an instance of a channel attributes nObject representing the attributes of a channel or queue to be found or created.
static nObject createConsumeEvent (nEventProperties props, byte[] data) throws Exception
 Creates an instance of a ConsumeEvent nObject representing Nirvana events published or consumed.
static nObject createConsumeEvent (String tag, byte[] data) throws Exception
 Creates an instance of a ConsumeEvent nObject representing Nirvana events published or consumed.
static nObject createConsumeEvent (byte[] tag, byte[] data) throws Exception
 Creates an instance of a ConsumeEvent nObject representing Nirvana events published or consumed.
static nObject createIterator (nObject channel, nObject namedobject, String selector) throws Exception
 Create a default channel iterator starting at the eid specified in the channel with the events which match the selector being returned.
static nObject createIterator (nObject channel, String selector, long startEID) throws Exception
 Create a default channel iterator starting at the beginning of the channel.
static nObject createNamedObject (nObject channel, String name, boolean persistent) throws Exception
 Removes all references for this name on the realm Server.
static nObject createPublishKey (String name, int depth) throws Exception
 Creates an instance of a publish key nObject representing Nirvana channel publish keys.
static nObject createQueue (nObject session, nObject channelattributes) throws Exception
 Creates a new queue on the realm this session is connected.
static nObject createQueuePeekContext (int windowSize, String selector) throws Exception
 Creates a Queue Peek Context, which is used to traverse the queue.
static nObject createSession (String[] RNAMEs, String username) throws Exception
 Creates a Nirvana session, the logical connection to a Nirvana realm.
static nObject createTransaction (nObject transactionattributes) throws Exception
 Constructs a transaction nObject based on the specified transaction attributes.
static nObject createTransactionAttributes (nObject channel, long aTimeToLive) throws Exception
 Constructs an nTransactionAttributes object associated with the channel specified.
static void deleteChannel (nObject session, nObject channelattributes) throws Exception
 Deletes a nirvana channel that exists on the realm the specified session is connected to, or a joined realm.
static void deleteNamedObject (nObject channel, nObject namedobject) throws Exception
 Deletes the specified named object.
static void deleteQueue (nObject session, nObject channelattributes) throws Exception
 Deletes a nirvana queue that exists on the realm the specified session is connected to, or a joined realm.
static nObject findChannel (nObject session, nObject channelattributes) throws Exception
 Finds and returns a nirvana channel that exists on the realm this session is connected to, or a joined realm in the current realm's namespace.
static nObject findQueue (nObject session, nObject channelattributes) throws Exception
 Finds and returns a nirvana queue that exists on the realm this session is connected to, or a joined realm in the current realm's namespace.
static int getChannelAttributesMaxEvents (nObject channelattributes) throws Exception
 Gets the max events (capacity) setting in the specified channel attributes.
static byte getChannelAttributesMode (nObject channelattributes) throws Exception
 Gets the mode (channel or queue) setting in the specified channel attributes.
static String getChannelAttributesName (nObject channelattributes) throws Error
 Gets the name of value from the specified channelattributes.
static nObject[] getChannelAttributesPublishKeys (nObject channelattributes) throws Exception
 Gets the collection of publish keys associated with the specified channel attributes.
static nObject getChannelAttributesRealm (nObject channelattributes) throws Exception
 Gets the realm that the specified channelattributes resides into.
static long getChannelAttributesTTL (nObject channelattributes) throws Exception
 Gets the Time to Live (TTL) setting in the specified channel attributes.
static byte getChannelAttributesType (nObject channelattributes) throws Exception
 Gets the type (Simple, Reliable, Persistent or Mixed) setting in the specified channel attributes.
static int getEventCountsize (nObject channelorqueue) throws Exception
 Returns the total number of events currently in the specified queue or channel.
static byte[] getEventData (nObject consumeevent) throws Exception
 Gets the event body of the specified consume event.
static long getEventID (nObject consumeevent) throws Exception
 Gets the event id of the specified consume event.
static nEventProperties getEventProperties (nObject consumeevent) throws Error
 Gets the event properties of the specified consume event.
static String getEventTag (nObject consumeevent) throws Exception
 Gets the event tag of the specified consume event.
static long getEventTTL (nObject consumeevent) throws Exception
 Gets the event TTL of the specified consume event.
static long getEventWait (nObject session) throws Exception
 This method sets the maximum wait time for responses from the Nirvana server (defaults to 60.000ms).
static nObject getFirst (nObject channeliterator) throws Exception
 This method returns the first event in the channel using the specified channel iterator.
static long getFirstQueuedEventTime (nObject queuedetails) throws Exception
 Gets the first queued event timestamp.
static nObject getLast (nObject channeliterator) throws Exception
 This method returns the last event in the channel using the specified channel iterator.
static long getLastEID (nObject channel) throws Exception
 Gets the last EID published on the specified channel.
static long getLastQueueEventTime (nObject queuedetails) throws Exception
 Gets the last queued event's timestamp.
static nObject getNamedObject (nObject channel, String name) throws Exception
 Returns an instance of the namedobject with the specified name.
static String getNamedObjectName (nObject namedobject) throws Exception
 Gets the name associated with a named object.
static nObject[] getNamedObjects (nObject channel) throws Exception
 Returns an array of all known namedobjects registered with the specified channel.
static nObject getNext (nObject channeliterator, long timeout) throws Exception
 This returns the next event in the channel using the specified channel iterator.
static nObject getNext (nObject channeliterator) throws Exception
 This method returns the next event in the channel using the specified channel iterator.
static int getNoOfQueueEvents (nObject queuedetails) throws Exception
 Gets the total number of events for the specified queue.
static int getNoOfQueueReaders (nObject queuedetails) throws Exception
 Gets the total number of queue readers for the specified queue.
static nObject getPrev (nObject channeliterator) throws Exception
 This method returns the previous event in the channel using the specified channel iterator.
static int getPublishKeyDepth (nObject pubkey) throws Exception
 Gets the depth setting of the specified channel publish key.
static String getPublishKeyName (nObject pubkey) throws Exception
 Gets the name setting of the specified channel publish key.
static nObject[] getPublishKeys (nObject channelattributes) throws Exception
 Gets the collection of publish keys associated with the specified channel attributes nObject instance.
static nObject getQueueDetails (nObject queue) throws Exception
 Gets the current queue details containing up to date queue information (queue readers, total messages etc).
static int getQueuePeekContextIndex (nObject queuepeekcontext) throws Exception
 Gets the index into the queue that the context is up to.
static String getQueuePeekContextSelector (nObject queuepeekcontext) throws Exception
 Gets the message selector of the specified queue peek context.
static int getQueuePeekContextWindowSize (nObject queuepeekcontext) throws Exception
 Gets the window size of the specified queue peek context.
static Vector getRealmConnections (nObject realm) throws Exception
 Gets the collection of possible connect RNAMEs from the specified realm nObject.
static String getRealmMountPoint (nObject realm) throws Exception
 Gets the namespace mountpoint of the specified realm nObject.
static String getRealmName (nObject realm) throws Exception
 Gets the realm name for the specified realm nObject.
static String getSessionID (nObject session) throws Exception
 Gets the session id for the specified session.
static String[] getSessionRNAME (nObject session) throws Exception
 Creates a Nirvana session, the logical connection to a Nirvana realm.
static long getTotalQueueMemorySize (nObject queuedetails) throws Exception
 Gets the total number of bytes specified queue consumes on the server.
static nObject getTXAttributes (nObject transaction) throws Exception
 Gets the transaction attributes object associated with this transaction.
static long getTXEndEID (nObject transaction) throws Exception
 Gets the end event id of the range published by this transaction after commit.
static long getTXID (nObject transaction) throws Exception
 Gets the unique transaction id associated with the specified transaction object.
static long getTXStartEID (nObject transaction) throws Exception
 Gets the start event id of the range published by this transaction after commit.
static void initSession (nObject session) throws Exception
 Initialises the specified session making it physically connected with the Nirvana realm.
static boolean isChannelAttributesClusterWide (nObject channelattributes) throws Exception
 Checks if the specified channel attributes represents a cluster wide channel / queue or not (Nirvana 3 only).
static boolean isChannelAttributesExternal (nObject channelattributes) throws Exception
 Checks if the specified channelattributes represents an external channel or queue.
static boolean isConnected (nObject session) throws Exception
 Checks if the specified session is physically connected with the Nirvana realm.
static boolean isEventPersistent (nObject consumeevent) throws Exception
 Checks if the specified consume event has been marked as persistent or not.
static boolean isNamedObjectPersistent (nObject namedobject) throws Exception
 Checks if a named object is persistenly stored on the Nirvana server or valid for this session only.
static boolean isTransactionAborted (nObject channel, long txid) throws Exception
 Checks if a transaction with the transaction id specified has been aborted on the specified channel.
static boolean isTransactionAborted (nObject transaction, boolean forceRemoteCheck) throws Exception
 Checks if the transaction specified is aborted.
static boolean isTransactionCommitted (nObject channel, long txid) throws Exception
 Checks if a transaction with the transaction id specified has been commited on the specified channel.
static boolean isTransactionCommitted (nObject transaction, boolean forceRemoteCheck) throws Exception
 Checks if the transaction specified is committed.
static synchronized void pause (nObject session) throws Exception
 This method pauses delivery of new events to all subscribers until resume is called.
static nObject[] peekQueue (nObject queue, nObject queuepeekcontext) throws Exception
 Performs a non destructive queue read using the specified queue peek context.
static nObject popFromQueue (nObject queue, long timeout, String selector) throws Exception
 This method places thie client on the queue and will block until an event is placed onto the queue.
static void publish (nObject channel, nObject consumeevent) throws Exception
 Publishes reliably the specified consumeevent to the specified Nirvana channel.
static void publishTransactionally (nObject transaction, Vector consumeevents) throws Exception
 Adds the specified nConsumeEvent to this transaction.
static void purgeEvents (nObject channel, long startEID, long endEID, String selector) throws Exception
 Purges a single event from this channel.
static void purgeEventsAsync (nObject channel, long startEID, long endEID, String selector) throws Exception
 Purges a range of events from the specified channel, optionally matching the specified selector.
static void purgeQueue (nObject queue) throws Exception
 Deletes all undelivered events from the queue specified.
static long pushOnQueue (nObject queue, nObject consumeevent) throws Exception
 Pushes the specified event on the specified queue.
static boolean queuePeekContextHasMore (nObject queuepeekcontext) throws Exception
 Indicates if there are more events in the queue based on the specified queue peek context.
static synchronized void resume (nObject session) throws Exception
 This method resumes delivery of new events to all subscribers.
static void rollback (nObject consumeevent) throws Exception
 Negatively acknowledges the specified consume event for a named subscriber that was created WITHOUT auto acknowledge.
static void setChannelAttributeClusterWide (nObject channelattributes, boolean clusterwide) throws Exception
 Sets the specified channel attributes to represent a cluster wide channel / queue.
static void setChannelAttributeMaxEvents (nObject channelattributes, int maxevents) throws Exception
 Sets the max events (capacity) setting in the specified channel attributes.
static void setChannelAttributeMode (nObject channelattributes, byte mode) throws Exception
 Sets the mode (channel or queue) setting in the specified channel attributes.
static void setChannelAttributePublishKeys (nObject channelattributes, nObject[] keys) throws Exception
 Used to specify the required publish keys for a channel to be created.
static void setChannelAttributesName (nObject channelattributes, String name) throws Exception
 Sets the name of value from the specified channelattributes.
static void setChannelAttributesPublishKeys (nObject channelattributes, nObject[] keys) throws Exception
 Associates the specified collection of publish keys with the specified channel attributes.
static void setChannelAttributeTTL (nObject channelattributes, long TTL) throws Exception
 Sets the Time to Live (TTL) setting in the specified channel attributes.
static void setChannelAttributeType (nObject channelattributes, byte type) throws Exception
 Sets the type (Simple, Reliable, Persistent or Mixed) setting in the specified channel attributes.
static void setEventPersistent (nObject consumeevent, boolean persistent) throws Exception
 Sets the specified consume event marked as persistent.
static void setEventTTL (nObject consumeevent, long ttl) throws Exception
 Sets the event TTL of the specified consume event.
static void setEventWait (nObject session, long eventwait) throws Exception
 This method sets the maximum wait time for responses from the Nirvana server (defaults to 60.000ms).
static void setPublishKeyDepth (nObject pubkey, int depth) throws Exception
 Sets the depth setting of the specified channel publish key.
static void setPublishKeyName (nObject pubkey, String name) throws Exception
 Sets the name setting of the specified channel publish key.

Detailed Description

A generic polymorphic class to represent all container/attribute/data classes in the J2SE Nirvana client API.

The reason everything is represented as a single class is to reduce the total number of classes and therefore the total bytecode size and memory footprint, as dictated by the restricted capabilities of MIDP and IMP devices. A large number of static factory methods return nObjects of a specific type, so make sure you pass the correct nObject instance arguments to methods or validating exceptions will be thrown.


Member Function Documentation

static void j2meClient.nObject.abortTransaction ( nObject  transaction  )  throws Exception [static]

Aborts the transaction specified.

Parameters:
transaction the transaction object to abort
Exceptions:
Exception is thrown if the transaction is already commited or aborted or if the transaction object is null / of the wrong nObject type.

static void j2meClient.nObject.ack ( nObject  consumeevent  )  throws Exception [static]

Positively acknowledges the specified consume event for a named subscriber that was created WITHOUT auto acknowledge.

Parameters:
consumeevent The consume event to positively acknoledge
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type or the associated nirvana session is not currently connected to the server.

static nObject j2meClient.nObject.closeIterator ( nObject  iterator  )  throws Exception [static]

Create a channel iterator on the specified channel allowing synchronous reading of events using a named object.

Parameters:
channel the Nirvana channel specified.
namedobject The named object to use
selector A server side message selector allowing to restrict the events to iterate (null for no selector)
Returns:
the newly created channel iterator

static void j2meClient.nObject.closeSession ( nObject  session  )  throws Exception [static]

Closes the specified session making it physically disconnected with the Nirvana realm and stopping all background threads.

Parameters:
session the specified Nirvana session
Exceptions:
Exception is thrown if session is null / of incorrect nObject type

static void j2meClient.nObject.commitTransaction ( nObject  transaction  )  throws Exception [static]

Commits the transaction specified.

Parameters:
transaction the transaction object to commit
Exceptions:
Exception is thrown if the transaction is already commited or aborted or if the transaction object is null / of the wrong nObject type.

static nObject j2meClient.nObject.createChannel ( nObject  session,
nObject  channelattributes,
long  initialEID 
) throws Exception [static]

Creates a new channel on the realm this session is connected.

If the channel attributes specify a realm different than the one this session is connected to, a transparent redirection will occur and the channel will be created on that realm.

Parameters:
attr The channel attributes object containing the parameters for the new channel to be created
Returns:
an nChannel object representing the newly created nirvana channel
Exceptions:
Exception The remote node responded with an unknown exception Creates a new channel on the realm this session is connected.
Parameters:
channelattributes The channel attributes object containing the parameters for the new channel to be created
initialEID The channel will be created with the first eid being set to this value or 0 for defaut initial eid.
Returns:
the newly created Channel nObject instance
Exceptions:
Exception is thrown if session/channelattributes are null / of incorrect nObject type, if the user has unsifficient priviledges, if the session is not connected or if a channel with the same name already exists.

static nObject j2meClient.nObject.createChannelAttributes (  )  throws Exception [static]

Creates an instance of a channel attributes nObject representing the attributes of a channel or queue to be found or created.

Exceptions:
Exception is thrown if an unexpected system error occurs
Returns:
the newly created channel attributes

static nObject j2meClient.nObject.createConsumeEvent ( nEventProperties  props,
byte[]  data 
) throws Exception [static]

Creates an instance of a ConsumeEvent nObject representing Nirvana events published or consumed.

A Nirvana Consume Event can consist of either a tag and event body or an nEventProperties collection and event body. Please note that message selectors can only be applied on events containing nEventProperties. Events created default to persistent with no TTL (Time to Live) (These only apply when publishing on mixed channels)

Parameters:
props The event properties
data The event body as a byte[]
Exceptions:
Exception is thrown both tag and data are null.
Returns:
the newly created consume event.

static nObject j2meClient.nObject.createConsumeEvent ( String  tag,
byte[]  data 
) throws Exception [static]

Creates an instance of a ConsumeEvent nObject representing Nirvana events published or consumed.

A Nirvana Consume Event can consist of either a tag and event body or an nEventProperties collection and event body. Please note that message selectors can only be applied on events containing nEventProperties. Events created default to persistent with no TTL (Time to Live) (These only apply when publishing on mixed channels)

Parameters:
tag The event tag as a String
data The event body as a byte[]
Exceptions:
Exception is thrown both tag and data are null.
Returns:
the newly created consume event.

static nObject j2meClient.nObject.createConsumeEvent ( byte[]  tag,
byte[]  data 
) throws Exception [static]

Creates an instance of a ConsumeEvent nObject representing Nirvana events published or consumed.

A Nirvana Consume Event can consist of either a tag and event body or an nEventProperties collection and event body. Please note that message selectors can only be applied on events containing nEventProperties. Events created default to persistent with no TTL (Time to Live) (These only apply when publishing on mixed channels)

Parameters:
tag The event tag as a byte[]
data The event body as a byte[]
Exceptions:
Exception is thrown both tag and data are null.
Returns:
the newly created consume event.

static nObject j2meClient.nObject.createIterator ( nObject  channel,
nObject  namedobject,
String  selector 
) throws Exception [static]

Create a default channel iterator starting at the eid specified in the channel with the events which match the selector being returned.

Parameters:
namedobject Named Object reference to use for this iterator
Returns:
nChannelIterator for the current channel Create a channel iterator on the specified channel allowing synchronous reading of events using a named object.
Parameters:
channel the Nirvana channel specified.
namedobject The named object to use
selector A server side message selector allowing to restrict the events to iterate (null for no selector)
Returns:
the newly created channel iterator

static nObject j2meClient.nObject.createIterator ( nObject  channel,
String  selector,
long  startEID 
) throws Exception [static]

Create a default channel iterator starting at the beginning of the channel.

Returns:
nChannelIterator for the current channel Create a default channel iterator starting at the beginning of the channel with the events which match the selector being returned
Parameters:
selector Used to specify a sub set of the current channel events
Returns:
nChannelIterator for the current channel Create a default channel iterator starting at the EID specified
Parameters:
startEID The event to start iterating the channel from
Returns:
nChannelIterator for the current channel Create a channel iterator on the specified channel allowing synchronous reading of events.
Parameters:
channel the Nirvana channel specified.
selector A server side message selector allowing to restrict the events to iterate (null for no selector)
startEID The event id to start iterating the channel from (0 to iterate all events)
Returns:
the newly created channel iterator

static nObject j2meClient.nObject.createNamedObject ( nObject  channel,
String  name,
boolean  persistent 
) throws Exception [static]

Removes all references for this name on the realm Server.

Parameters:
name the name to be removed from the server
Exceptions:
Exception is thrown if the caller has unsufficient permissions Creates a named object on the channel with the given name
Parameters:
name to create
Returns:
the nNamedObject created
Exceptions:
Exception is thrown if the caller has unsufficient permissions Creates a named object on the channel with the given name and depending on the persistent flag informs the server to store the name and value to disk or not. Named objects are useful for subscribing/iterating where the server remembers the event id you are up to and events are acknowledged manually or automatically.
Parameters:
channel the channel to create the named object for
name to use for the named object to create
persistent flag to indicate to the server to store on disk or in memory.
Returns:
the newly created namedobject
Exceptions:
Exception is thrown if channel is null / of incorrect nObject type, if name is null or empty, if the session is not currently connected to the server or if the user has insufficient priviledges

static nObject j2meClient.nObject.createPublishKey ( String  name,
int  depth 
) throws Exception [static]

Creates an instance of a publish key nObject representing Nirvana channel publish keys.

A publish key enforces a restriction on a the maximum number of a certain consume event that can exist on a channel in order to eliminate the need for manual purges. For example assume you have a channel that receives published consume events containing person details, with these stored as nEventProperties entries. Each person event has a number of attributes but you want to enforce that only 1 event for each person ever exists on the channel. To do that you simple create a channel with a publish key where the name is the name of the nEventProperties key (e.g. person.name) and the depth is the maximum number of such events you want to coexist on the channel (e.g. 1). If an event containing the details for John Smith exists on the channel and another one is published with new details, the old one will automatically be purged.

Parameters:
name The name of the nEventProperties key that this rule should be enforced for
depth The depth specified as an int
Exceptions:
Exception is thrown is name is null or empty, and if depth is <= 0
Returns:
the newly created publish key nObject instance

static nObject j2meClient.nObject.createQueue ( nObject  session,
nObject  channelattributes 
) throws Exception [static]

Creates a new queue on the realm this session is connected.

Parameters:
session the session to use in order to create the queue
channelattributes The channel attributes object containing the parameters for the new channel to be created
Returns:
the newly created queue nObject instance
Exceptions:
Exception is thrown if session/channelattributes are null / of incorrect nObject type, if the user has unsifficient priviledges, if the session is not connected or if a channel with the same name already exists.

static nObject j2meClient.nObject.createQueuePeekContext ( int  windowSize,
String  selector 
) throws Exception [static]

Creates a Queue Peek Context, which is used to traverse the queue.

Returns:
A new nQueuePeekContext Creates a Queue Peek Context, which is used to traverse the queue
Parameters:
windowSize The size of the window over the queue to uses
Returns:
A new nQueuePeekContext Creates a Queue Peek Context, which is used to traverse the queue using non destructive reads. (Peek) As the queue might contain a large number of events a window size and selector can be used to restrict the scope of each peek call.
Parameters:
windowSize The window size to be used
selector A message selector to be applied on the events (server side), or null if no selector is required.
Returns:
The newly created queuePeekContext nObject instance
Exceptions:
Exception is thrown if the selector is invalid

static nObject j2meClient.nObject.createSession ( String[]  RNAMEs,
String  username 
) throws Exception [static]

Creates a Nirvana session, the logical connection to a Nirvana realm.

Parameters:
RNAMEs a String[] containing at least 1 valid RNAME entry. An RNAME is a Nirvana Realm URL specifying the protocol, host and port that the realm runs on.
username an optional String value to be used as the username authenticating to Nirvana. If null, the username defaults to j2meuser.
Returns:
A Nirvana session nObject instance
Exceptions:
Exception is thrown if RNAMEs param is null or empty or contains invalid entries.

static nObject j2meClient.nObject.createTransaction ( nObject  transactionattributes  )  throws Exception [static]

Constructs a transaction nObject based on the specified transaction attributes.

Parameters:
transactionattributes The transaction attributes object specifying the attributes for this transaction
Returns:
an instance of nObject representing the newly created transaction.
Exceptions:
Exception is thrown if transaction attributes is null or of incorrect nObject type.

static nObject j2meClient.nObject.createTransactionAttributes ( nObject  channel,
long  aTimeToLive 
) throws Exception [static]

Constructs an nTransactionAttributes object associated with the channel specified.

Parameters:
channelimpl The nirvana channel associated with this transaction
Exceptions:
Exception If there is an error during the construction, check the message for more information Constructs an transaction attributes object associated with the channel specified. Transactions created with this method will have the Time To Live (TTL) specified.
Parameters:
channel The nirvana channel associated with the transaction
aTimeToLive The Time To Live (TTL) value that the transaction will have, or -2 to use the server side TTL setting.
Returns:
an instance of nObject representing the newly created transaction attributes.
Exceptions:
Exception is thrown if channel is null or of incorrect type.

static void j2meClient.nObject.deleteChannel ( nObject  session,
nObject  channelattributes 
) throws Exception [static]

Deletes a nirvana channel that exists on the realm the specified session is connected to, or a joined realm.

Note: all events in that channel will be deleted too and are not recoverable.

Parameters:
session the session to be used for this operation
channelattributes The channel attributes of the channel to be deleted (name attribute is the only necessary)
Exceptions:
Exception is thrown if session/channelattributes are null/of incorrect nObject type, user has unsufficient priviledges or the session is not currently connected to the server.

static void j2meClient.nObject.deleteNamedObject ( nObject  channel,
nObject  namedobject 
) throws Exception [static]

Deletes the specified named object.

Parameters:
namedobject the named object to be deleted
Exceptions:
Exception is thrown if namedobject is null / of incorrect nObject type, or if the named object does not exist.

static void j2meClient.nObject.deleteQueue ( nObject  session,
nObject  channelattributes 
) throws Exception [static]

Deletes a nirvana queue that exists on the realm the specified session is connected to, or a joined realm.

Note: all events in that queue will be deleted too and are not recoverable.

Parameters:
session the session to be used for this operation
channelattributes The channel attributes of the queue to be deleted (name attribute is the only necessary)
Exceptions:
Exception is thrown if session/channelattributes are null/of incorrect nObject type, user has unsufficient priviledges or the session is not currently connected to the server.

static nObject j2meClient.nObject.findChannel ( nObject  session,
nObject  channelattributes 
) throws Exception [static]

Finds and returns a nirvana channel that exists on the realm this session is connected to, or a joined realm in the current realm's namespace.

Parameters:
session The nirvana session to be used to find the channel
channelattributes The channel attributes describing the channel to be found
Returns:
The Channel nObject instance found on the realm server
Exceptions:
Exception is thrown if session or channelattributes are null / of incorrect nObject type, if the session is currently not connected or if the channel specified can not be found.

static nObject j2meClient.nObject.findQueue ( nObject  session,
nObject  channelattributes 
) throws Exception [static]

Finds and returns a nirvana queue that exists on the realm this session is connected to, or a joined realm in the current realm's namespace.

Parameters:
session The nirvana session to be used to find the queue
channelattributes The channel attributes describing the queue to be found
Returns:
The Queue nObject instance found on the realm server
Exceptions:
Exception is thrown if session or channelattributes are null / of incorrect nObject type, if the session is currently not connected or if the queue specified can not be found.

static int j2meClient.nObject.getChannelAttributesMaxEvents ( nObject  channelattributes  )  throws Exception [static]

Gets the max events (capacity) setting in the specified channel attributes.

If the capacity of a channel / queue is 10 then when the 11th event is published the 1st will be automatically purged.

Parameters:
channelattributes The specified channel attributes.
Returns:
the channel / queue capacity as an int
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type or if type is not one of the valid types.

static byte j2meClient.nObject.getChannelAttributesMode ( nObject  channelattributes  )  throws Exception [static]

Gets the mode (channel or queue) setting in the specified channel attributes.

Parameters:
channelattributes The specified channel attributes.
Returns:
A byte equal to either nMIDlet.CHAN_MODE_NORMAL or nMIDlet.CHAN_MODE_QUEUE
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static String j2meClient.nObject.getChannelAttributesName ( nObject  channelattributes  )  throws Error [static]

Gets the name of value from the specified channelattributes.

Parameters:
channelattributes The specified channel attributes.
Returns:
A String representing the name value
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static nObject [] j2meClient.nObject.getChannelAttributesPublishKeys ( nObject  channelattributes  )  throws Exception [static]

Gets the collection of publish keys associated with the specified channel attributes.

Parameters:
channelattributes The specified channel attributes.
Returns:
an array of nObjects representing the publish keys associated with this channel attributes instance.
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static nObject j2meClient.nObject.getChannelAttributesRealm ( nObject  channelattributes  )  throws Exception [static]

Gets the realm that the specified channelattributes resides into.

Parameters:
channelattributes The specified channel attributes.
Returns:
A realm nObject instance containing the realm's name, mount point and interfaces.
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static long j2meClient.nObject.getChannelAttributesTTL ( nObject  channelattributes  )  throws Exception [static]

Gets the Time to Live (TTL) setting in the specified channel attributes.

Parameters:
channelattributes The specified channel attributes.
Returns:
A long indicating the TTL setting in ms
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static byte j2meClient.nObject.getChannelAttributesType ( nObject  channelattributes  )  throws Exception [static]

Gets the type (Simple, Reliable, Persistent or Mixed) setting in the specified channel attributes.

A Simple channel/queue stores nothing on persistent storage. Upon restart all events are lost and event ids are not retained. A Reliable channel/queue is the same as a simple channel/queue with the difference that event ids are persistently stored and never repeated. A Persistent channel/queue stores events and event ids on persistent storage. All data is available upon restart. A Mixed channel/queue allows users to specify on a per event basis if it should be persistent or not, while event ids are retained.

Parameters:
channelattributes The specified channel attributes.
Returns:
A byte equal to either nMIDlet.CHAN_SIMPLE , nMIDlet.CHAN_RELIABLE ,nMIDlet.CHAN_PERSISTENT or nMIDlet.CHAN_MIXED
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static int j2meClient.nObject.getEventCountsize ( nObject  channelorqueue  )  throws Exception [static]

Returns the total number of events currently in the specified queue or channel.

Parameters:
channelorqueue a queue or a channel to get the total number of events from
Returns:
The size of the queue or channel as an int
Exceptions:
Exception is thrown if channelorqueue are null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient priviledges.

static byte [] j2meClient.nObject.getEventData ( nObject  consumeevent  )  throws Exception [static]

Gets the event body of the specified consume event.

Parameters:
consumeevent The consume event to get the event body for.
Returns:
A byte[] specifying the event body or null if not set.
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static long j2meClient.nObject.getEventID ( nObject  consumeevent  )  throws Exception [static]

Gets the event id of the specified consume event.

Parameters:
consumeevent The consume event to get the event id for.
Returns:
A long specifying the event id.
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static nEventProperties j2meClient.nObject.getEventProperties ( nObject  consumeevent  )  throws Error [static]

Gets the event properties of the specified consume event.

Parameters:
consumeevent The consume event to get the event tag for.
Returns:
the nEventProperties instance associated with this consumeevent or null if none set
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static String j2meClient.nObject.getEventTag ( nObject  consumeevent  )  throws Exception [static]

Gets the event tag of the specified consume event.

Parameters:
consumeevent The consume event to get the event tag for.
Returns:
A String specifying the event tag or null if not set.
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static long j2meClient.nObject.getEventTTL ( nObject  consumeevent  )  throws Exception [static]

Gets the event TTL of the specified consume event.

Please note that event level TTL settings only apply when publishing on mixed channels.

Parameters:
consumeevent The consume event to get the event TTL for.
Returns:
A long specifying the event TTL in ms
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static long j2meClient.nObject.getEventWait ( nObject  session  )  throws Exception [static]

This method sets the maximum wait time for responses from the Nirvana server (defaults to 60.000ms).

Parameters:
session the session to set event wait for
Returns:
the current maximum wait time in ms
Exceptions:
Exception is thrown if session is null / of incorrect nObject type

static nObject j2meClient.nObject.getFirst ( nObject  channeliterator  )  throws Exception [static]

This method returns the first event in the channel using the specified channel iterator.

Parameters:
channeliterator the channeliterator to use
Returns:
a consumeevent or null if no events could be found.
Exceptions:
Exception is thrown if channeliterator is null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient priviledges.

static long j2meClient.nObject.getFirstQueuedEventTime ( nObject  queuedetails  )  throws Exception [static]

Gets the first queued event timestamp.

Parameters:
queuedetails the queuedetails nObject instance
Returns:
a long representing the first queued event's timestamp
Exceptions:
Exception is thrown if queuedetails is null / of incorrect nObject type

static nObject j2meClient.nObject.getLast ( nObject  channeliterator  )  throws Exception [static]

This method returns the last event in the channel using the specified channel iterator.

Parameters:
channeliterator the channeliterator to use
Returns:
a consumeevent or null if no events could be found.
Exceptions:
Exception is thrown if channeliterator is null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient priviledges.

static long j2meClient.nObject.getLastEID ( nObject  channel  )  throws Exception [static]

Gets the last EID published on the specified channel.

Parameters:
channel the channel nObject instance to get the last EID from
Returns:
a long specifying the event id (EID) of the last event published on the channel
Exceptions:
Exception is thrown if the caller has unsufficient permissions, if the channel parameter is null or of incorrect type.

static long j2meClient.nObject.getLastQueueEventTime ( nObject  queuedetails  )  throws Exception [static]

Gets the last queued event's timestamp.

Parameters:
queuedetails the queuedetails nObject instance
Returns:
a long representing the last queued event's timestamp
Exceptions:
Exception is thrown if queuedetails is null / of incorrect nObject type

static nObject j2meClient.nObject.getNamedObject ( nObject  channel,
String  name 
) throws Exception [static]

Returns an instance of the namedobject with the specified name.

Parameters:
channel the channel to search for the named object
name the name to search for
Returns:
the namedobject or null if it does not exist
Exceptions:
Exception is thrown if channel is null / of incorrect nObject type, if name is null or empty, if the session is not currently connected to the server or if the user has insufficient priviledges

static String j2meClient.nObject.getNamedObjectName ( nObject  namedobject  )  throws Exception [static]

Gets the name associated with a named object.

Parameters:
namedobject the named object to get the name from
Returns:
A string with the named object's name
Exceptions:
Exception is thrown if namedobject is null / of incorrect nObject type.

static nObject [] j2meClient.nObject.getNamedObjects ( nObject  channel  )  throws Exception [static]

Returns an array of all known namedobjects registered with the specified channel.

Parameters:
channel the channel to get all named objects from
Returns:
the array of named objects
Exceptions:
Exception is thrown if channel is null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient priviledges

static nObject j2meClient.nObject.getNext ( nObject  channeliterator,
long  timeout 
) throws Exception [static]

This returns the next event in the channel using the specified channel iterator.

If no event is found the method will block for a maximum time equal to the timeout specified.

Parameters:
channeliterator the channeliterator to use
timeout the maximum blocking time for an event to become published.
Returns:
the next consumeevent
Exceptions:
Exception is thrown if channeliterator is null / of incorrect nObject type, if the session is not currently connected to the server,if the user has insufficient priviledges or if the timeout period elapses and no events are available.

static nObject j2meClient.nObject.getNext ( nObject  channeliterator  )  throws Exception [static]

This method returns the next event in the channel using the specified channel iterator.

If no events are found it will block until one is published that matches the iterator criteria (eid and selector if set)

Parameters:
channeliterator the channeliterator to use
Returns:
the next consumeevent
Exceptions:
Exception is thrown if channeliterator is null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient priviledges.

static int j2meClient.nObject.getNoOfQueueEvents ( nObject  queuedetails  )  throws Exception [static]

Gets the total number of events for the specified queue.

Parameters:
queuedetails the queuedetails nObject instance
Returns:
an int representing the current number of events queued
Exceptions:
Exception is thrown if queuedetails is null / of incorrect nObject type

static int j2meClient.nObject.getNoOfQueueReaders ( nObject  queuedetails  )  throws Exception [static]

Gets the total number of queue readers for the specified queue.

Parameters:
queuedetails the queuedetails nObject instance
Returns:
an int representing the current number of queue readers
Exceptions:
Exception is thrown if queuedetails is null / of incorrect nObject type

static nObject j2meClient.nObject.getPrev ( nObject  channeliterator  )  throws Exception [static]

This method returns the previous event in the channel using the specified channel iterator.

Parameters:
channeliterator the channeliterator to use
Returns:
the previous consumeevent
Exceptions:
Exception is thrown if channeliterator is null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient priviledges.

static int j2meClient.nObject.getPublishKeyDepth ( nObject  pubkey  )  throws Exception [static]

Gets the depth setting of the specified channel publish key.

Parameters:
pubkey The specified channel publish key
Returns:
the channel publish key depth as an int
Exceptions:
Exception is thrown if pubkey are null / of incorrect nObject type.

static String j2meClient.nObject.getPublishKeyName ( nObject  pubkey  )  throws Exception [static]

Gets the name setting of the specified channel publish key.

Parameters:
pubkey The specified channel publish key
Returns:
the channel publish key depth as an int
Exceptions:
Exception is thrown if pubkey are null / of incorrect nObject type.

static nObject [] j2meClient.nObject.getPublishKeys ( nObject  channelattributes  )  throws Exception [static]

Gets the collection of publish keys associated with the specified channel attributes nObject instance.

Parameters:
channelattributes the channel attributes nObject instance to get the publish keys from
Returns:
An array of publish key nObject instances associated with the specified channel attributes nObject instance
Exceptions:
Exception is thrown if channelattributes specified is null or of the wrong nObject type.

static nObject j2meClient.nObject.getQueueDetails ( nObject  queue  )  throws Exception [static]

Gets the current queue details containing up to date queue information (queue readers, total messages etc).

Parameters:
queue the queue nObject instance to get the queuedetails from
Returns:
a queuedetails nObject instance containing the relevant information
Exceptions:
Exception is thrown if queue is null / of incorrect nObject type

static int j2meClient.nObject.getQueuePeekContextIndex ( nObject  queuepeekcontext  )  throws Exception [static]

Gets the index into the queue that the context is up to.

Parameters:
queuepeekcontext the queuepeekcontext to use
Returns:
the index into the queue
Exceptions:
Exception is thrown if queuepeekcontext is null / of incorrect nObject type.

static String j2meClient.nObject.getQueuePeekContextSelector ( nObject  queuepeekcontext  )  throws Exception [static]

Gets the message selector of the specified queue peek context.

Parameters:
queuepeekcontext the queuepeekcontext to use
Returns:
The message selector or null if none set.
Exceptions:
Exception is thrown if queuepeekcontext is null / of incorrect nObject type.

static int j2meClient.nObject.getQueuePeekContextWindowSize ( nObject  queuepeekcontext  )  throws Exception [static]

Gets the window size of the specified queue peek context.

Parameters:
queuepeekcontext the queuepeekcontext to use
Returns:
The size of the window
Exceptions:
Exception is thrown if queuepeekcontext is null / of incorrect nObject type.

static Vector j2meClient.nObject.getRealmConnections ( nObject  realm  )  throws Exception [static]

Gets the collection of possible connect RNAMEs from the specified realm nObject.

If you attempt to find a channel or queue which resides on an external realm mounted to the current realm's namespace, its channel attributes will contain a realm nObject instance containing the name, mountpoint and possible direct connections based on its interfaces.

Parameters:
realm The specified realm
Returns:
a Vector containing String RNAMES with all possible realm connections.
Exceptions:
Exception is thrown if realm is null / of incorrect nObject type.

static String j2meClient.nObject.getRealmMountPoint ( nObject  realm  )  throws Exception [static]

Gets the namespace mountpoint of the specified realm nObject.

If you attempt to find a channel or queue which resides on an external realm mounted to the current realm's namespace, its channel attributes will contain a realm nObject instance containing the name, mountpoint and possible direct connections based on its interfaces.

Parameters:
realm The specified realm
Returns:
a String containing realm's mountpoint in the current namespace.
Exceptions:
Exception is thrown if realm is null / of incorrect nObject type.

static String j2meClient.nObject.getRealmName ( nObject  realm  )  throws Exception [static]

Gets the realm name for the specified realm nObject.

If you attempt to find a channel or queue which resides on an external realm mounted to the current realm's namespace, its channel attributes will contain a realm nObject instance containing the name, mountpoint and possible direct connections based on its interfaces.

Parameters:
realm The specified realm
Returns:
a String containing the realm's name.
Exceptions:
Exception is thrown if realm is null / of incorrect nObject type.

static String j2meClient.nObject.getSessionID ( nObject  session  )  throws Exception [static]

Gets the session id for the specified session.

Parameters:
session the specified Nirvana session
Exceptions:
Exception is thrown if session is null / of incorrect nObject type or the session is not connected.

static String [] j2meClient.nObject.getSessionRNAME ( nObject  session  )  throws Exception [static]

Creates a Nirvana session, the logical connection to a Nirvana realm.

Parameters:
session the session nObject
Returns:
A String[] with the RNAMEs associated with the specified session object.
Exceptions:
Exception is thrown if session param is null or not of session type.

static long j2meClient.nObject.getTotalQueueMemorySize ( nObject  queuedetails  )  throws Exception [static]

Gets the total number of bytes specified queue consumes on the server.

Parameters:
queuedetails the queuedetails nObject instance
Returns:
a long representing the total number of bytes consumed at the server by this queue
Exceptions:
Exception is thrown if queuedetails is null / of incorrect nObject type

static nObject j2meClient.nObject.getTXAttributes ( nObject  transaction  )  throws Exception [static]

Gets the transaction attributes object associated with this transaction.

Parameters:
transaction The transaction specified
Returns:
an nObject instance representing the transaction attributes associated with this transaction
Exceptions:
Exception is thrown if the transaction object is null / of the wrong nObject type.

static long j2meClient.nObject.getTXEndEID ( nObject  transaction  )  throws Exception [static]

Gets the end event id of the range published by this transaction after commit.

Parameters:
transaction The transaction specified
Returns:
a long specifying the end event id of the range published by this transaction after commit.
Exceptions:
Exception is thrown if the transaction is not yet commited or the transaction object is null / of the wrong nObject type.

static long j2meClient.nObject.getTXID ( nObject  transaction  )  throws Exception [static]

Gets the unique transaction id associated with the specified transaction object.

Parameters:
transaction The transaction specified
Returns:
a long specifying the unique transaction id for this transaction
Exceptions:
Exception is thrown if the transaction object is null / of the wrong nObject type.

static long j2meClient.nObject.getTXStartEID ( nObject  transaction  )  throws Exception [static]

Gets the start event id of the range published by this transaction after commit.

Parameters:
transaction The transaction specified
Returns:
a long specifying the start event id of the range published by this transaction after commit.
Exceptions:
Exception is thrown if the transaction is not yet commited or the transaction object is null / of the wrong nObject type.

static void j2meClient.nObject.initSession ( nObject  session  )  throws Exception [static]

Initialises the specified session making it physically connected with the Nirvana realm.

Please note that this call starts background threads and applications should always close initialised sessions for normal termination.

Parameters:
session the specified Nirvana session
Exceptions:
Exception is thrown if session is null / of incorrect nObject type, if the realm is unreachable or the user has insufficient priviledges.

static boolean j2meClient.nObject.isChannelAttributesClusterWide ( nObject  channelattributes  )  throws Exception [static]

Checks if the specified channel attributes represents a cluster wide channel / queue or not (Nirvana 3 only).

Parameters:
channelattributes The specified channel attributes.
Returns:
A boolean indicating if the represented channel / queue is clusterwide or not.
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static boolean j2meClient.nObject.isChannelAttributesExternal ( nObject  channelattributes  )  throws Exception [static]

Checks if the specified channelattributes represents an external channel or queue.

Parameters:
channelattributes The specified channel attributes.
Returns:
true if the channel represented is on an external realm mounted under the original realm's namespace, false if it is local.
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static boolean j2meClient.nObject.isConnected ( nObject  session  )  throws Exception [static]

Checks if the specified session is physically connected with the Nirvana realm.

Parameters:
session the specified Nirvana session
Returns:
true if connected false otherwise
Exceptions:
Exception is thrown if session is null / of incorrect nObject type.

static boolean j2meClient.nObject.isEventPersistent ( nObject  consumeevent  )  throws Exception [static]

Checks if the specified consume event has been marked as persistent or not.

Please note that event level TTL settings only apply when publishing on mixed channels.

Parameters:
consumeevent The consume event to check the persistence flag for.
Returns:
true if the consume event is marked as persistent false otherwise.
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static boolean j2meClient.nObject.isNamedObjectPersistent ( nObject  namedobject  )  throws Exception [static]

Checks if a named object is persistenly stored on the Nirvana server or valid for this session only.

Parameters:
namedobject the named object to check
Returns:
true if the named object is persistent, false otherwise.
Exceptions:
Exception is thrown if namedobject is null / of incorrect nObject type.

static boolean j2meClient.nObject.isTransactionAborted ( nObject  channel,
long  txid 
) throws Exception [static]

Checks if a transaction with the transaction id specified has been aborted on the specified channel.

Parameters:
channel the channel associated with the transaction
txid the transaction id of the transaction you want to check on the server
Returns:
a boolean value specifying if the transaction has been aborted
Exceptions:
Exception is thrown if the channel object is null / of the wrong nObject type or if the transaction id is unknown by the server.

static boolean j2meClient.nObject.isTransactionAborted ( nObject  transaction,
boolean  forceRemoteCheck 
) throws Exception [static]

Checks if the transaction specified is aborted.

Parameters:
transaction the transaction object
forceRemoteCheck if false, the api may respond using its local state information (if available), if true, it will query the Nirvana realm server only
Returns:
a boolean value specifying if the transaction has been aborted
Exceptions:
Exception is thrown if the transaction object is null / of the wrong nObject type.

static boolean j2meClient.nObject.isTransactionCommitted ( nObject  channel,
long  txid 
) throws Exception [static]

Checks if a transaction with the transaction id specified has been commited on the specified channel.

Parameters:
channel the channel associated with the transaction
txid the transaction id of the transaction you want to check on the server
Returns:
a boolean value specifying if the transaction has been committed
Exceptions:
Exception is thrown if the channel object is null / of the wrong nObject type or if the transaction id is unknown by the server.

static boolean j2meClient.nObject.isTransactionCommitted ( nObject  transaction,
boolean  forceRemoteCheck 
) throws Exception [static]

Checks if the transaction specified is committed.

Parameters:
transaction the transaction object
forceRemoteCheck if false, the api may respond using its local state information (if available), if true, it will query the Nirvana realm server only
Returns:
a boolean value specifying if the transaction has been committed
Exceptions:
Exception is thrown if the transaction object is null / of the wrong nObject type.

static synchronized void j2meClient.nObject.pause ( nObject  session  )  throws Exception [static]

This method pauses delivery of new events to all subscribers until resume is called.

Parameters:
session the session to pause
Exceptions:
Exception is thrown if session is null / of incorrect nObject type

static nObject [] j2meClient.nObject.peekQueue ( nObject  queue,
nObject  queuepeekcontext 
) throws Exception [static]

Performs a non destructive queue read using the specified queue peek context.

Parameters:
queue the queue nObject instance specified.
queuepeekcontext The queue peek context nObject instance specified.
Returns:
An Array of consume event nObject instances
Exceptions:
Exception is thrown if queue/queuepeekcontext are null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient privildges.

static nObject j2meClient.nObject.popFromQueue ( nObject  queue,
long  timeout,
String  selector 
) throws Exception [static]

This method places thie client on the queue and will block until an event is placed onto the queue.

Returns:
The popped event
Exceptions:
InterruptedException The thread was interrupted prior to the event being popped This method places thie client on the queue and will block until an event is placed onto the queue or the specified timeout expires.
If the timeout expires it will return null

Parameters:
timeout Time to wait in milliseconds for an event
Returns:
The popped event or null if the timeout expired
Exceptions:
InterruptedException The thread was interrupted prior to the event being popped This method pops messages from the specified queue. It is a blocking method that will only return if an event is found (optionally matching a message selector) or if the specified timeout occurs.
Parameters:
timeout the time to wait in milliseconds for an event, or -1 to wait for ever.
selector A message selector (server side) to be applied for this pop operation, or null if all events pushed are required.
Returns:
The popped event or null if the timeout expired
Exceptions:
Exception is thrown if queue is null / of incorrect nObject type, if selector is invalid, if the session is not currently connected, if the user has insufficient priviledges or if the timeout persion elapses and no event is available.

static void j2meClient.nObject.publish ( nObject  channel,
nObject  consumeevent 
) throws Exception [static]

Publishes reliably the specified consumeevent to the specified Nirvana channel.

Please note that this publishing method is for very volatile data and does not involve server side acknowledgment. Events are queued up and published as soon as possible with the minimum blocking time for the application. If you wish to be absolutely sure that your events have reached the Nirvana realm, please use transactional publishing.

Parameters:
channel the channel to publish to
consumeevent the consumeevent object to be published
Exceptions:
Exception is thrown if channel / consumeevent are null / of incorrect nObject type, if the session is not currently connected to the server or if the user has insufficient priviledges.

static void j2meClient.nObject.publishTransactionally ( nObject  transaction,
Vector  consumeevents 
) throws Exception [static]

Adds the specified nConsumeEvent to this transaction.

No events will be published until this transaction is commited

Parameters:
event the nConsumeEvent object to be added to this transaction Adds the specified collection of ConsumeEvent nObject instances to the specified transaction, to be published transactionally. Please note that no events will be published until this transaction is commited.
transaction the transaction to add the events into
consumeevents the Vector collection of ConsumeEvent nObject instances to be added to this transaction
Exceptions:
Exception is thrown if the transaction specified is null / of incorrect nObject type or if the consumeevents collection is null or empty or does not contain ConsumeEvent nObject instances.

static void j2meClient.nObject.purgeEvents ( nObject  channel,
long  startEID,
long  endEID,
String  selector 
) throws Exception [static]

Purges a single event from this channel.

Parameters:
eidval a long specifying the event id of the event to be purged from the channel
Exceptions:
Exception is thrown if the caller has unsufficient permissions Purges a single event from this channel
Parameters:
eidval a long specifying the event id of the event to be purged from the channel
Exceptions:
Exception is thrown if the caller has unsufficient permissions Purges a range of events from this channel
Parameters:
startEID a long specifying the start event id of the range of events to be purged from the channel
endEID a long specifying the end event id of the range of events to be purged from the channel
Exceptions:
Exception is thrown if the caller has unsufficient permissions Purges a range of events from this channel
Parameters:
startEID a long specifying the start event id of the range of events to be purged from the channel
endEID a long specifying the end event id of the range of events to be purged from the channel
Exceptions:
Exception is thrown if the caller has unsufficient permissions Purges a range of events from the specified channel, optionally matching the specified selector. The operation is synchronous meaning that the method will block until those events are purged from the server.
Parameters:
channel the channel nObject instance to purge the events from.
startEID a long specifying the start event id of the range of events to be purged from the channel.
endEID a long specifying the end event id of the range of events to be purged from the channel .
selector A message selector which will be used to filter out only the events which match this criteria. Set to null if all events in the range are to be purged.
Exceptions:
Exception is thrown if the caller has unsufficient permissions, if the channel parameter is null or of incorrect type and if startEID and endEID are negative.

static void j2meClient.nObject.purgeEventsAsync ( nObject  channel,
long  startEID,
long  endEID,
String  selector 
) throws Exception [static]

Purges a range of events from the specified channel, optionally matching the specified selector.

The operation is asynchronous meaning that the method will not block but instantly return.

Parameters:
channel the channel nObject instance to purge the events from.
startEID a long specifying the start event id of the range of events to be purged from the channel
endEID a long specifying the end event id of the range of events to be purged from the channel
selector A messages selector which will be used to filter out only the events which match this criteria
Exceptions:
Exception is thrown if the caller has unsufficient permissions, if the channel parameter is null or of incorrect type and if startEID and endEID are negative.

static void j2meClient.nObject.purgeQueue ( nObject  queue  )  throws Exception [static]

Deletes all undelivered events from the queue specified.

Parameters:
queue the queue to delete all events from
Exceptions:
Exception is thrown if queue is null / of incorrect nObject type, the sesssion is not currently connected on the server or the user has insufficient priviledges.

static long j2meClient.nObject.pushOnQueue ( nObject  queue,
nObject  consumeevent 
) throws Exception [static]

Pushes the specified event on the specified queue.

Parameters:
queue the queue to push the event on
consumeevent the consume event nObject instance to be pushed
Returns:
a long representing the unique event id on the queue
Exceptions:
Exception is thrown if queue/consumeevent is null / of incorrect nObject type, if the session is currently disconnected or if the user has unsufficient priviledges.

static boolean j2meClient.nObject.queuePeekContextHasMore ( nObject  queuepeekcontext  )  throws Exception [static]

Indicates if there are more events in the queue based on the specified queue peek context.

Parameters:
queuepeekcontext the queuepeekcontext to use
Returns:
true indicating there were more events in the queue after the last peek, false otherwise
Exceptions:
Exception is thrown if queuepeekcontext is null / of incorrect nObject type

static synchronized void j2meClient.nObject.resume ( nObject  session  )  throws Exception [static]

This method resumes delivery of new events to all subscribers.

Parameters:
session the session to resume
Exceptions:
Exception is thrown if session is null / of incorrect nObject type

static void j2meClient.nObject.rollback ( nObject  consumeevent  )  throws Exception [static]

Negatively acknowledges the specified consume event for a named subscriber that was created WITHOUT auto acknowledge.

Parameters:
consumeevent The consume event to negatively acknowledge
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type or the associated nirvana session is not currently connected to the server.

static void j2meClient.nObject.setChannelAttributeClusterWide ( nObject  channelattributes,
boolean  clusterwide 
) throws Exception [static]

Sets the specified channel attributes to represent a cluster wide channel / queue.

(Nirvana 3 only)

Parameters:
channelattributes The specified channel attributes.
clusterwide the flag indicating the attributes cluster status.
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static void j2meClient.nObject.setChannelAttributeMaxEvents ( nObject  channelattributes,
int  maxevents 
) throws Exception [static]

Sets the max events (capacity) setting in the specified channel attributes.

If the capacity of a channel / queue is 10 then when the 11th event is published the 1st will be automatically purged.

Parameters:
channelattributes The specified channel attributes.
maxevents the channel / queue or -1 for no capacity.
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type.

static void j2meClient.nObject.setChannelAttributeMode ( nObject  channelattributes,
byte  mode 
) throws Exception [static]

Sets the mode (channel or queue) setting in the specified channel attributes.

Parameters:
channelattributes The specified channel attributes.
mode byte equal to either nMIDlet.CHAN_MODE_NORMAL or nMIDlet.CHAN_MODE_QUEUE
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type , or if mode is not one of the 2 valid values.

static void j2meClient.nObject.setChannelAttributePublishKeys ( nObject  channelattributes,
nObject[]  keys 
) throws Exception [static]

Used to specify the required publish keys for a channel to be created.

It associates the specified array of publish key nObject instances to the specified channel attribute nObject instance.

Parameters:
channelattributes The channel attributes nObject instance
keys The collection of publish key nObject instances to be associated with the specified channel attributes
Exceptions:
Exception is thrown if channelattributes is null or not of channelattribute type, keys is empty or contains nObjects not of publish key type

static void j2meClient.nObject.setChannelAttributesName ( nObject  channelattributes,
String  name 
) throws Exception [static]

Sets the name of value from the specified channelattributes.

Parameters:
channelattributes The specified channel attributes.
name the name value
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type or if name is null.

static void j2meClient.nObject.setChannelAttributesPublishKeys ( nObject  channelattributes,
nObject[]  keys 
) throws Exception [static]

Associates the specified collection of publish keys with the specified channel attributes.

Parameters:
channelattributes The specified channel attributes.
keys the specified collection of publish keys.
Exceptions:
Exception is thrown if channelattributes/keys are null / of incorrect nObject type.

static void j2meClient.nObject.setChannelAttributeTTL ( nObject  channelattributes,
long  TTL 
) throws Exception [static]

Sets the Time to Live (TTL) setting in the specified channel attributes.

Parameters:
channelattributes The specified channel attributes.
TTL A long indicating the TTL setting in ms (use 0 for no TTL)
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type or if TTL is negative.

static void j2meClient.nObject.setChannelAttributeType ( nObject  channelattributes,
byte  type 
) throws Exception [static]

Sets the type (Simple, Reliable, Persistent or Mixed) setting in the specified channel attributes.

A Simple channel/queue stores nothing on persistent storage. Upon restart all events are lost and event ids are not retained. A Reliable channel/queue is the same as a simple channel/queue with the difference that event ids are persistently stored and never repeated. A Persistent channel/queue stores events and event ids on persistent storage. All data is available upon restart. A Mixed channel/queue allows users to specify on a per event basis if it should be persistent or not, while event ids are retained.

Parameters:
channelattributes The specified channel attributes.
type A byte equal to either nMIDlet.CHAN_SIMPLE , nMIDlet.CHAN_RELIABLE ,nMIDlet.CHAN_PERSISTENT or nMIDlet.CHAN_MIXED
Exceptions:
Exception is thrown if channelattributes are null / of incorrect nObject type or if type is not one of the valid types.

static void j2meClient.nObject.setEventPersistent ( nObject  consumeevent,
boolean  persistent 
) throws Exception [static]

Sets the specified consume event marked as persistent.

Please note that event level TTL settings only apply when publishing on mixed channels.

Parameters:
consumeevent The consume event to set the persistence flag for.
persistent true if the consume event should be marked as persistent false otherwise.
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static void j2meClient.nObject.setEventTTL ( nObject  consumeevent,
long  ttl 
) throws Exception [static]

Sets the event TTL of the specified consume event.

Please note that event level TTL settings only apply when publishing on mixed channels.

Parameters:
consumeevent The consume event to set the event TTL for.
ttl A long specifying the event TTL in ms
Exceptions:
Exception is thrown if consumeevent is null / of incorrect nObject type.

static void j2meClient.nObject.setEventWait ( nObject  session,
long  eventwait 
) throws Exception [static]

This method sets the maximum wait time for responses from the Nirvana server (defaults to 60.000ms).

Parameters:
session the session to set event wait for
eventwait the maximum wait time in ms
Exceptions:
Exception is thrown if session is null / of incorrect nObject type

static void j2meClient.nObject.setPublishKeyDepth ( nObject  pubkey,
int  depth 
) throws Exception [static]

Sets the depth setting of the specified channel publish key.

Parameters:
pubkey The specified channel publish key
depth the channel publish key depth as an int
Exceptions:
Exception is thrown if pubkey are null / of incorrect nObject type.

static void j2meClient.nObject.setPublishKeyName ( nObject  pubkey,
String  name 
) throws Exception [static]

Sets the name setting of the specified channel publish key.

Parameters:
pubkey The specified channel publish key
name the channel publish key name
Exceptions:
Exception is thrown if pubkey are null / of incorrect nObject type or if name is empty or null.

String j2meClient.nObject.toString (  ) 

Provides a String representation of this nObject instance.

Naturally this depends on the nObject type.

Returns:
a String representation of this nObject instance.