public class ShApplication extends ClientApplication
| Modifier and Type | Field and Description |
|---|---|
static ApplicationId |
ID
Sh application identifier
|
| Constructor and Description |
|---|
ShApplication() |
| Modifier and Type | Method and Description |
|---|---|
ShSession |
createSession()
Creates a new client ShSession.
|
ShSession |
createSession(String id,
Object parent) |
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,
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,
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.
|
createRequest, createSession, createSessionId, getDestinationHost, getDestinationRealm, getName, getNode, getOriginHost, getOriginRealm, getParameter, getParameter, log, log, rcvAnswer, rcvMessage, setDestinationHost, setDestinationRealmpublic static final ApplicationId ID
public void init()
throws DiameterException
init in class ClientApplicationDiameterException - if the initialization failedpublic ApplicationId getId()
getId in class Applicationpublic RepositoryData getRepositoryData(AccessKey key) throws DiameterException, IOException
key - the AccessKey for the requested dataIllegalArgumentException - if not a repository data AccessKeyMessageException - if the answer from the HSS indicated an errorIOException - if an I/O error occurredDiameterExceptionpublic void putRepositoryData(AccessKey key, RepositoryData rd) throws DiameterException, IOException
key - the AccessKey for the datard - the new RepositoryDataMessageException - if the answer from the HSS indicated an errorIOException - if an I/O error occurredDiameterExceptionpublic Document getDocument(AccessKey key) throws DiameterException, IOException
key - the AccessKey for the dataMessageException - if the answer from the HSS indicated an errorIOException - if an I/O error occurredDiameterExceptionpublic void putDocument(AccessKey key, Document doc) throws DiameterException, IOException
key - the AccessKey for the datadoc - the updated user dataIllegalArgumentException - if the document format was invalidMessageException - if the answer from the HSS indicated an errorIOException - if an I/O error occurredDiameterExceptionpublic void subscribe(AccessKey key) throws DiameterException, IOException
key - the AccessKey for the dataMessageException - if the answer from the HSS indicated an errorIOException - if an I/O error occurredDiameterExceptionpublic void unsubscribe(AccessKey key) throws DiameterException, IOException
key - the AccessKey for the dataMessageException - if the answer from the HSS indicated an errorIOException - if an I/O error occurredDiameterExceptionpublic ShSession createSession()
createSession in class Applicationpublic ShSession createSession(String id, Object parent)
createSession in class Applicationpublic void setTimeout(long msec)
msec - the request timeout in millisecondspublic long getTimeout()
protected void rcvRequest(Request req) throws DiameterException, IOException
rcvRequest in class Applicationreq - the Sh PNR requestsDiameterException - if an error occurred while processingIOException - if an I/O error occurred