Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Communication and Mobility Server Java API Reference E14335-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.sdp.parlayx.presence.consumer
Class PresenceConsumerClient

    java.lang.Object
      oracle.sdp.parlayx.presence.consumer.PresenceConsumerClient

    public class PresenceConsumerClient

extends Object

Constructor Summary
`PresenceConsumerClient()`
`PresenceConsumerClient(String assertedId)` This constructor registers the assertedIdentityHandler to insert the SOAP header.

Method Summary
`void` | `endPresenceNotification(String correlator)` This method implemented as describe in ParlayX 2.1 specs.
`oracle.webservices.transport.ClientTransport` | `getClientTransport()` returns the transport context
`String` | `getEndpoint()`
`boolean` | `getMaintainSession()`
`String` | `getPassword()`
`oracle.sdp.parlayx.presence.consumer.PresenceConsumer` | `getPort()` used to access the JAX-RPC level APIs returns the interface of the port instance
`String` | `getUsername()`
`org.csapi.schema.parlayx.presence.v2_3.PresenceAttribute[]` | `getUserPresence(URI presentity, org.csapi.schema.parlayx.presence.v2_3.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 elements.
`static void` | `main(String[] args)`
`void` | `setEndpoint(String endpoint)`
`void` | `setMaintainSession(boolean maintainSession)`
`void` | `setPassword(String password)`
`void` | `setUsername(String username)`
`URI[]` | `startPresenceNotification(URI presentity, org.csapi.schema.parlayx.presence.v2_3.PresenceAttributeType[] attributes, org.csapi.schema.parlayx.common.v2_1.SimpleReference reference, org.csapi.schema.parlayx.common.v2_1.TimeMetric frequency, org.csapi.schema.parlayx.common.v2_1.TimeMetric duration, Integer count, boolean checkImmediate)` This method implemented as describe in ParlayX 2.1 specs except frequency, duration and count is not implemented.
`void` | `subscribePresence(URI presentity, org.csapi.schema.parlayx.presence.v2_3.PresenceAttributeType[] attributes, String application, org.csapi.schema.parlayx.common.v2_1.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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PresenceConsumerClient

    public PresenceConsumerClient()
                           throws Exception

Throws:
  `Exception`

### PresenceConsumerClient

    public PresenceConsumerClient(String assertedId)
                           throws Exception

  This constructor registers the assertedIdentityHandler to insert the SOAP header. This constructor should be called if the client is in the trusted host list of the Aggregation Proxy

  Parameters:
    `assertedId` - The asserted identity to be used to identify the user.
  Throws:
    `Exception`

Method Detail

### main

    public static void main(String[] args)

  Parameters:
    `args` -

### subscribePresence

    public void subscribePresence(URI presentity,
                                  org.csapi.schema.parlayx.presence.v2_3.PresenceAttributeType[] attributes,
                                  String application,
                                  org.csapi.schema.parlayx.common.v2_1.SimpleReference reference)
                           throws RemoteException,
                                  org.csapi.schema.parlayx.common.v2_1.PolicyException,
                                  org.csapi.schema.parlayx.common.v2_1.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.
  3. Subscribe to raw PIDF
     - If you want to receive the raw PIDF in getUserPresence() or via the statusChanged() notification interface, you will need to add Other to the attributes array.

  Parameters:
    `presentity` - SIP or PRES address of the presentity.
    `attributes` - Currently only support Activity and Other for raw PIDF.
    `application` - Not used unless Oracle Extension is used. See above for Oracle specific.
    `reference` - Reference to the PresenceNotification interface.
  Throws:
    `org.csapi.schema.parlayx.common.v2_1.ServiceException`
    `org.csapi.schema.parlayx.common.v2_1.PolicyException`
    `RemoteException`

### getUserPresence

    public org.csapi.schema.parlayx.presence.v2_3.PresenceAttribute[] getUserPresence(URI presentity,
                                                                                      org.csapi.schema.parlayx.presence.v2_3.PresenceAttributeType[] attributes)
                                                                               throws RemoteException,
                                                                                      org.csapi.schema.parlayx.common.v2_1.PolicyException,
                                                                                      org.csapi.schema.parlayx.common.v2_1.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 elements. This is the service and device note published by the presentity. If you have subscribed to raw PIDF during subscribePresence(), an OtherValue("RawPidf") will be one of the elements. The value is the raw PIDF from the presence server.
  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.

  Parameters:
    `presentity` - SIP or PRES address of the presentity.
    `attributes` - Currently only support activity.
  Returns:
    An array of PresenceAttributes that contains presence information.
  Throws:
    `org.csapi.schema.parlayx.common.v2_1.ServiceException`
    `org.csapi.schema.parlayx.common.v2_1.PolicyException`
    `RemoteException`

### startPresenceNotification

    public URI[] startPresenceNotification(URI presentity,
                                           org.csapi.schema.parlayx.presence.v2_3.PresenceAttributeType[] attributes,
                                           org.csapi.schema.parlayx.common.v2_1.SimpleReference reference,
                                           org.csapi.schema.parlayx.common.v2_1.TimeMetric frequency,
                                           org.csapi.schema.parlayx.common.v2_1.TimeMetric duration,
                                           Integer count,
                                           boolean checkImmediate)
                                    throws RemoteException,
                                           org.csapi.schema.parlayx.common.v2_1.ServiceException,
                                           org.csapi.schema.parlayx.common.v2_1.PolicyException

  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.

  Parameters:
    `presentity` - The presentity or group whose attributes the watcher wants to monitor.
    `attributes` - Ignored. It will return all the attributes subscribed via subscribePresence.
    `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:
    `org.csapi.schema.parlayx.common.v2_1.ServiceException`
    `org.csapi.schema.parlayx.common.v2_1.PolicyException`
    `RemoteException`

### endPresenceNotification

    public void endPresenceNotification(String correlator)
                                 throws RemoteException,
                                        org.csapi.schema.parlayx.common.v2_1.PolicyException,
                                        org.csapi.schema.parlayx.common.v2_1.ServiceException

  This method implemented as describe in ParlayX 2.1 specs.

  Parameters:
    `correlator` - Correlator passed in startPresenceNotification.
  Throws:
    `org.csapi.schema.parlayx.common.v2_1.PolicyException`
    `org.csapi.schema.parlayx.common.v2_1.ServiceException`
    `RemoteException`

### getPort

    public oracle.sdp.parlayx.presence.consumer.PresenceConsumer getPort()

  used to access the JAX-RPC level APIs returns the interface of the port instance

### getEndpoint

    public String getEndpoint()

### setEndpoint

    public void setEndpoint(String endpoint)

### getPassword

    public String getPassword()

### setPassword

    public void setPassword(String password)

### getUsername

    public String getUsername()

### setUsername

    public void setUsername(String username)

### setMaintainSession

    public void setMaintainSession(boolean maintainSession)

### getMaintainSession

    public boolean getMaintainSession()

### getClientTransport

    public oracle.webservices.transport.ClientTransport getClientTransport()

  returns the transport context

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007-2009 Oracle Corporation. All Rights Reserved.