Oracle Corp.

Oracle WebLogic Communications Server 10.1 API Reference


com.bea.wcp.diameter.sh
Class ShApplication

java.lang.Object
  extended bycom.bea.wcp.diameter.Application
      extended bycom.bea.wcp.diameter.ClientApplication
          extended bycom.bea.wcp.diameter.sh.ShApplication

public class ShApplication
extends ClientApplication

Sh client application. See 3GPP TS 29.328 v6.8.0 and 3GPP TS 29.329 v6.6.0 for Sh protocol details.

Copyright © 2008 Oracle Corp. All Rights Reserved.

Field Summary
static ApplicationId ID
          Sh application identifier
 
Constructor Summary
ShApplication()
           
 
Method Summary
 ShSession createSession()
          Creates a new client ShSession.
 org.w3c.dom.Document getDocument(AccessKey key)
          Retrieves the data associated with the specified AccessKey by sending a UDR request and waiting for the corresponding UDA.
 ApplicationId getId()
          Returns the Sh application identifier.
 RepositoryData getRepositoryData(AccessKey key)
          Returns the RepositoryData for the specified Sh AccessKey.
 long getTimeout()
          Returns the current request timeout.
 void init()
          Initializes the ShApplication.
 void putDocument(AccessKey key, org.w3c.dom.Document doc)
          Updates data for the specified AccessKey by sending a PDR request and waiting for the corresponding PDA.
 void putRepositoryData(AccessKey key, RepositoryData rd)
          Updates repository data for specified AccessKey.
protected  void rcvPush(AccessKey key, org.w3c.dom.Document doc)
          Called whenever a new PNR message has been received.
protected  void rcvRequest(Request req)
          Called by the container when a new Sh request has been received.
 void setTimeout(long msec)
          Sets the maximum number of millisecons to wait for an answer from the HSS.
 void subscribe(AccessKey key)
          Starts subscription for the data referred to by the specified AccessKey.
 void unsubscribe(AccessKey key)
          Unsubscribes from the data referred to by the specified AccessKey.
 
Methods inherited from class com.bea.wcp.diameter.Application
createRequest, createSessionId, getDestinationHost, getDestinationRealm, getName, getNode, getOriginHost, getOriginRealm, getParameter, getParameter, log, log, rcvAnswer, rcvMessage, setDestinationHost, setDestinationRealm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final ApplicationId ID
Sh application identifier

Constructor Detail

ShApplication

public ShApplication()
Method Detail

createSession

public ShSession createSession()
Creates a new client ShSession.

Returns:
the ShSession for this application

getDocument

public org.w3c.dom.Document getDocument(AccessKey key)
                                 throws DiameterException,
                                        java.io.IOException
Retrieves the data associated with the specified AccessKey by sending a UDR request and waiting for the corresponding UDA.

Parameters:
key - the AccessKey for the data
Returns:
the data associated with the key, or null if not found
Throws:
MessageException - if the answer from the HSS indicated an error
java.io.IOException - if an I/O error occurred
DiameterException

getId

public ApplicationId getId()
Returns the Sh application identifier.

Specified by:
getId in class Application
Returns:
the Sh ApplicationId

getRepositoryData

public RepositoryData getRepositoryData(AccessKey key)
                                 throws DiameterException,
                                        java.io.IOException
Returns the RepositoryData for the specified Sh AccessKey. If the repository data does not exist then an empty RepositoryData instance will be created with a sequence number of 0. See 3GPP TS 29.328 v6.8.0 table 7.6.1 for details on data access key format.

Parameters:
key - the AccessKey for the requested data
Returns:
the RepositoryData for the key
Throws:
java.lang.IllegalArgumentException - if not a repository data AccessKey
MessageException - if the answer from the HSS indicated an error
java.io.IOException - if an I/O error occurred
DiameterException

getTimeout

public long getTimeout()
Returns the current request timeout.

Returns:
the request timeout in milliseconds, or -1 if the default request timeout should be used

init

public void init()
          throws DiameterException
Initializes the ShApplication. The hss host and realm can be configured with the application init parameters "destination.host" and "destination.realm" respectively. The "timeout" parameter can also be optionally used to specific the maximum number of milliseconds to wait for an answer from the HSS. By default, this is 30 seconds.

Overrides:
init in class ClientApplication
Throws:
DiameterException

putDocument

public void putDocument(AccessKey key,
                        org.w3c.dom.Document doc)
                 throws DiameterException,
                        java.io.IOException
Updates data for the specified AccessKey by sending a PDR request and waiting for the corresponding PDA.

Parameters:
key - the AccessKey for the data
doc - the updated user data
Throws:
java.lang.IllegalArgumentException - if the document format was invalid
MessageException - if the answer from the HSS indicated an error
java.io.IOException - if an I/O error occurred
DiameterException

putRepositoryData

public void putRepositoryData(AccessKey key,
                              RepositoryData rd)
                       throws DiameterException,
                              java.io.IOException
Updates repository data for specified AccessKey.

Parameters:
key - the AccessKey for the data
rd - the new RepositoryData
Throws:
MessageException - if the answer from the HSS indicated an error
java.io.IOException - if an I/O error occurred
DiameterException

rcvPush

protected void rcvPush(AccessKey key,
                       org.w3c.dom.Document doc)
Called whenever a new PNR message has been received. This method should be overridden to provide handling of Push-Notification-Requests from the HSS.

Parameters:
key - the AccessKey for the user data
doc - the updated user data

rcvRequest

protected void rcvRequest(Request req)
                   throws DiameterException,
                          java.io.IOException
Called by the container when a new Sh request has been received. This request must be PNR since we are Sh client only.

Overrides:
rcvRequest in class Application
Parameters:
req - the Sh PNR requests
Throws:
DiameterException - if an error occurred while processing
java.io.IOException - if an I/O error occurred

setTimeout

public void setTimeout(long msec)
Sets the maximum number of millisecons to wait for an answer from the HSS. The default timeout is the request timeout value from the general Diameter configuration (30 seconds).

Parameters:
msec - the request timeout in milliseconds

subscribe

public void subscribe(AccessKey key)
               throws DiameterException,
                      java.io.IOException
Starts subscription for the data referred to by the specified AccessKey.

Parameters:
key - the AccessKey for the data
Throws:
MessageException - if the answer from the HSS indicated an error
java.io.IOException - if an I/O error occurred
DiameterException

unsubscribe

public void unsubscribe(AccessKey key)
                 throws DiameterException,
                        java.io.IOException
Unsubscribes from the data referred to by the specified AccessKey.

Parameters:
key - the AccessKey for the data
Throws:
MessageException - if the answer from the HSS indicated an error
java.io.IOException - if an I/O error occurred
DiameterException

Documentation is available at
http://e-docs.bea.com/wlcp/wlss40/
Copyright 2008 Oracle Corp.