org.netbeans.lib.collab
Interface PresenceService


public interface PresenceService

presence service session. A PresenceSession is use to access and advertise presence information. A presence information access unit or user agent, is called a presentity. Actual presence information is accessed by performing actions on a presentity.

Since:
version 0.1

Field Summary
static java.lang.String STATUS_AWAY
          user agent online / user unavailable
static java.lang.String STATUS_BUSY
          user agent online / user involved in other tasks and of limited availability
static java.lang.String STATUS_CHAT
          user agent chatting
static java.lang.String STATUS_CLOSED
          user agent offline / user unreachable
static java.lang.String STATUS_FORWARDED
          user agent offline / one-way messages forwarded to other delivery mechanism
static java.lang.String STATUS_IDLE
          Extended status to signify that the user is away.
static java.lang.String STATUS_OPEN
          user agent online / user available to communicate
static java.lang.String STATUS_OTHER
          other status
static java.lang.String STATUS_PENDING
          user's subscription is pending
 
Method Summary
 void addPresenceServiceListener(PresenceServiceListener listener)
          Add an additional PresenceServiceListener to receive the event notifications.
 void authorize(java.lang.String presentity)
          Authorize the presentity to receive presence updates The Presentity should have earlier requested for the Approval
 void cancel(java.lang.String presentity)
          cancels the previously granted subscription approval or deny the subscription request.
 Presence fetchPresence(java.lang.String presentity)
          retrieves presence information from the presence store synchronously
 Presence[] fetchPresence(java.lang.String[] presentity)
          retrieves presence information from the presence store synchronously
 void initialize(PresenceServiceListener listener)
          intialize the service by providing a PresenceServiceListener.
 void publish(Presence presence)
          Update a unit of presence information in the relevant presence stores.
 void publish(Presence presence, java.lang.String rcpt)
          Send a unit of presence information to a particular user
 void removePresenceServiceListener(PresenceServiceListener listener)
          Removes an already added ConfereneServiceListener.
 void subscribe(java.lang.String presentity)
          Subscribes to the presentity.
 void subscribe(java.lang.String[] presentity)
          Subscribes to the multiple presentity.
 void unsubscribe(java.lang.String presentity)
          Cancels any subscription made for a presentity.
 void unsubscribe(java.lang.String[] presentity)
          Cancels any subscription made to the specified presentities.
 

Field Detail

STATUS_OPEN

public static final java.lang.String STATUS_OPEN
user agent online / user available to communicate

See Also:
Constant Field Values

STATUS_CLOSED

public static final java.lang.String STATUS_CLOSED
user agent offline / user unreachable

See Also:
Constant Field Values

STATUS_AWAY

public static final java.lang.String STATUS_AWAY
user agent online / user unavailable

See Also:
Constant Field Values

STATUS_IDLE

public static final java.lang.String STATUS_IDLE
Extended status to signify that the user is away. user agent online / user idle and probably unresponsive

See Also:
Constant Field Values

STATUS_BUSY

public static final java.lang.String STATUS_BUSY
user agent online / user involved in other tasks and of limited availability

See Also:
Constant Field Values

STATUS_FORWARDED

public static final java.lang.String STATUS_FORWARDED
user agent offline / one-way messages forwarded to other delivery mechanism

See Also:
Constant Field Values

STATUS_CHAT

public static final java.lang.String STATUS_CHAT
user agent chatting

See Also:
Constant Field Values

STATUS_OTHER

public static final java.lang.String STATUS_OTHER
other status

See Also:
Constant Field Values

STATUS_PENDING

public static final java.lang.String STATUS_PENDING
user's subscription is pending

See Also:
Constant Field Values
Method Detail

subscribe

public void subscribe(java.lang.String presentity)
               throws CollaborationException
Subscribes to the presentity. The result of subscription will be informed through PresenceServiceListener

Parameters:
presentity - presentity url
Throws:
CollaborationException

subscribe

public void subscribe(java.lang.String[] presentity)
               throws CollaborationException
Subscribes to the multiple presentity. The result of subscription will be informed through PresenceServiceListener

Parameters:
presentity - a list of presentity urls
Throws:
CollaborationException

unsubscribe

public void unsubscribe(java.lang.String presentity)
                 throws CollaborationException
Cancels any subscription made for a presentity. The result of unsubscription will be informed through PresenceServiceListener

Parameters:
presentity - presentity url
Throws:
CollaborationException

unsubscribe

public void unsubscribe(java.lang.String[] presentity)
                 throws CollaborationException
Cancels any subscription made to the specified presentities. The result of unsubscription will be informed through PresenceServiceListener

Parameters:
presentity - array of presentity urls
Throws:
CollaborationException

publish

public void publish(Presence presence)
             throws CollaborationException
Update a unit of presence information in the relevant presence stores.

Parameters:
presence - Presence information
Throws:
CollaborationException

publish

public void publish(Presence presence,
                    java.lang.String rcpt)
             throws CollaborationException
Send a unit of presence information to a particular user

Parameters:
presence - Presence information
rcpt - The recipeint to whom the presence is directed.
Throws:
CollaborationException

fetchPresence

public Presence fetchPresence(java.lang.String presentity)
                       throws CollaborationException
retrieves presence information from the presence store synchronously

Parameters:
presentity - presentity url
Returns:
an presence object
Throws:
CollaborationException

fetchPresence

public Presence[] fetchPresence(java.lang.String[] presentity)
                         throws CollaborationException
retrieves presence information from the presence store synchronously

Parameters:
presentity - presentity url
Returns:
an array of presence objects
Throws:
CollaborationException

cancel

public void cancel(java.lang.String presentity)
            throws CollaborationException
cancels the previously granted subscription approval or deny the subscription request.

Parameters:
presentity - presentity url
Throws:
CollaborationException

authorize

public void authorize(java.lang.String presentity)
               throws CollaborationException
Authorize the presentity to receive presence updates The Presentity should have earlier requested for the Approval

Parameters:
presentity - presentity url
Throws:
CollaborationException

initialize

public void initialize(PresenceServiceListener listener)
                throws CollaborationException
intialize the service by providing a PresenceServiceListener. Service should be initialized by calling this method before using any of the services of PresenceService

Parameters:
listener - PresenceServiceListener
Throws:
CollaborationException

addPresenceServiceListener

public void addPresenceServiceListener(PresenceServiceListener listener)
Add an additional PresenceServiceListener to receive the event notifications. To receive all the initial events the first PresenceServiceListener should be added while initializing PresenceService.

Parameters:
listener - PresenceServiceListener The PresenceServiceListener to be added.

removePresenceServiceListener

public void removePresenceServiceListener(PresenceServiceListener listener)
Removes an already added ConfereneServiceListener. To prevent loss of any event notification it is advised to have atleast one PresenceServiceListener

Parameters:
listener - PresenceServiceListener The PresenceServiceListener to be removed.