Oracle Fusion Middleware Communication Services 11.1.1.1.0 Java API Reference
E14785-01

oracle.sdp.parlayx.presence.consumer
Class PresenceConsumerClient

java.lang.Object
  extended by oracle.sdpinternal.parlayx.ParlayXClientBase
      extended by oracle.sdp.parlayx.presence.consumer.PresenceConsumerClient
All Implemented Interfaces:
PresenceConsumer

public class PresenceConsumerClient
extends oracle.sdpinternal.parlayx.ParlayXClientBase
implements PresenceConsumer


Constructor Summary
PresenceConsumerClient(Map<java.lang.String,java.lang.Object> parameters)
          Construct a client capable of invoking a Parlay X PresenceConsumer webservice.
 
Method Summary
 void endPresenceNotification(java.lang.String correlator)
          This method implemented as describe in ParlayX 2.1 specs.
 PresenceConsumer getPort()
           
 List<PresenceAttribute> getUserPresence(java.lang.String presentity, List<PresenceAttributeType> attributes)
          This method will behave as described in the Parlay X 2.1 specs with the following Oracle Extension.
In the return array, an OtherValue("ServiceAndDeviceNote") may appear as one of the element.
 List<java.lang.String> startPresenceNotification(java.lang.String presentity, List<PresenceAttributeType> attributes, SimpleReference reference, TimeMetric frequency, TimeMetric duration, java.lang.Integer count, boolean checkImmediate)
          This method implemented as describe in ParlayX 2.1 specs except frequency, duration and count is not implemented.
 void subscribePresence(java.lang.String presentity, List<PresenceAttributeType> attributes, java.lang.String application, SimpleReference reference)
          This method will behave as described in the Parlay X 2.1 specs with the following Oracle Extension.
To subscribe to multiple presentities Set presentity to this special URI "ocms:multiple_presentities@presence.ocms.oracle.com" Set application to comma delimited sip or pres addresses. Short form can be used if all presentities are in the same domain and all are sip URI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresenceConsumerClient

public PresenceConsumerClient(Map<java.lang.String,java.lang.Object> parameters)
Construct a client capable of invoking a Parlay X PresenceConsumer webservice. The client is configured via a Map of name-object pairs. Any parameters specified will be passed through to the JAX-WS RequestContext. Thus, any key names specified in the JAX-WS documentation are valid, such as BindingProvider.ENDPOINT_ADDRESS_PROPERTY, BindingProvider.SESSION_MAINTAIN_PROPERTY, etc. Key names from class oracle.sdp.parlayx.ParlayXConstants may also be useful.

Parameters:
parameters - A Map of configuration parameters for the client. The values in this map will be passed through to the JAX-WS RequestContext as described above.
Method Detail

endPresenceNotification

public void endPresenceNotification(java.lang.String correlator)
                             throws PolicyException,
                                    ServiceException
This method implemented as describe in ParlayX 2.1 specs.

Specified by:
endPresenceNotification in interface PresenceConsumer
Parameters:
correlator - Correlator passed in startPresenceNotification.
Throws:
ServiceException
PolicyException
PolicyException
ServiceException

getPort

public PresenceConsumer getPort()

getUserPresence

public List<PresenceAttribute> getUserPresence(java.lang.String presentity,
                                               List<PresenceAttributeType> attributes)
                                        throws PolicyException,
                                               ServiceException
This method will behave as described in the Parlay X 2.1 specs with the following Oracle Extension.
  1. In the return array, an OtherValue("ServiceAndDeviceNote") may appear as one of the element. This is the service and device note published by the presentity.
  2. To get all subscribed users presence status:-
    • Set presentity to this special URI "ocms:all_users@presence.ocms.oracle.com".
    • The result will be in an array of PresenceAttribute.
      • The note part will contain the user's identity. It is always pre-pended to the actual note and delimited by a pair of square brackets. e.g. "[sip:test.user1@example.com]Gone Fishing"
    • Any exception that are supposed to be thrown on an individual user will not be thrown in this mode of operation. The exception will be enclosed in the PresenceAttributeType.OtherValue. The Name "Exception" and the Value will contain the exception message.
    • Exception will still be thrown if it is generic and not related to a particular user.

Specified by:
getUserPresence in interface PresenceConsumer
Parameters:
presentity - SIP or PRES address of the presentity.
attributes - Currently only support activity.
Returns:
An array of PresenceAttributes that contains presence information.
Throws:
ServiceException
PolicyException
java.rmi.RemoteException

startPresenceNotification

public List<java.lang.String> startPresenceNotification(java.lang.String presentity,
                                                        List<PresenceAttributeType> attributes,
                                                        SimpleReference reference,
                                                        TimeMetric frequency,
                                                        TimeMetric duration,
                                                        java.lang.Integer count,
                                                        boolean checkImmediate)
                                                 throws PolicyException,
                                                        ServiceException
This method implemented as describe in ParlayX 2.1 specs except frequency, duration and count is not implemented. These attributes will be controlled by the underlying SIP network.

Specified by:
startPresenceNotification in interface PresenceConsumer
Parameters:
presentity - The presentity or group whose attributes the watcher wants to monitor.
attributes - The attributes the watch wants to see. Currently, only Activity is allowed.
reference - URL to the notification interface.
frequency - Not used.
duration - Not used.
count - Not used.
checkImmediate - Whether to check status immediately after establishing notification.
Returns:
Throws:
ServiceException
PolicyException

subscribePresence

public void subscribePresence(java.lang.String presentity,
                              List<PresenceAttributeType> attributes,
                              java.lang.String application,
                              SimpleReference reference)
                       throws PolicyException,
                              ServiceException
This method will behave as described in the Parlay X 2.1 specs with the following Oracle Extension.
  1. To subscribe to multiple presentities
    • Set presentity to this special URI "ocms:multiple_presentities@presence.ocms.oracle.com"
    • Set application to comma delimited sip or pres addresses.
      • Short form can be used if all presentities are in the same domain and all are sip URI. The domain will be specified in the beginning using the format [DOMAIN=] followed by the username of the presentities. Any presentity that is not in the same domain or is not a SIP URI can still be in the list by putting in the whole address starting with the protocol. e.g. [DOMAIN=example.com]test.user1,test.user2,pres:test.user3@oracle.com
    • Any error will be return as Exception. The exception will show if appropriate which URI causes the exception. The caller should assume none of the subscription is processed.
  2. To unsubscribe to a single user
    • Set application to this special token "[UNSUBSCRIBE]" This action should be called if a watcher is removed from the pres-rule. e.g. A user is removed from a community. The community proxy user should do an unsubscribe on the removed user.

Specified by:
subscribePresence in interface PresenceConsumer
Parameters:
presentity - SIP or PRES address of the presentity.
attributes - Currently only support Activity.
application - Not used unless Oracle Extension is used. See above for Oracle specific.
reference - Reference to the PresenceNotification interface.
Throws:
ServiceException
PolicyException
java.rmi.RemoteException

Oracle Fusion Middleware Communication Services 11.1.1.1.0 Java API Reference
E14785-01

Copyright © 2005, 2009 Oracle and/or its affiliates. All rights reserved.