public interface RoProvider extends RoProviderFactory
The SBB interface for the Diameter Ro Resource Adaptor.
This API can be used in either an asynchronous or synchronous manner.
To send messages asynchronously, create a RoClientSessionActivity
using one of the
createRoClientSessionActivity()
methods.
To send messages synchronously, use the following methods:
eventCreditControlRequest(CreditControlRequest)
initialCreditControlRequest(CreditControlRequest)
updateCreditControlRequest(CreditControlRequest)
terminationCreditControlRequest(CreditControlRequest)
The Credit-Control-Request messages must be created using message factory:
RoMessageFactory
returned from getRoMessageFactory()
Modifier and Type | Method and Description |
---|---|
RoClientSessionActivity |
createRoClientSessionActivity()
Create a new activity to send and receive Diameter messages.
|
RoClientSessionActivity |
createRoClientSessionActivity(DiameterIdentity destinationHost,
DiameterIdentity destinationRealm)
Create a new activity to send and receive Diameter messages.
|
RoClientSessionActivity |
createRoClientSessionActivity(DiameterIdentity destinationHost,
DiameterIdentity destinationRealm,
java.lang.String sessionIdOptionalComponent)
Create a new activity to send and receive Diameter messages.
|
RoClientSessionActivity |
createRoClientSessionActivity(java.lang.String sessionIdOptionalComponent)
Create a new activity to send and receive Diameter messages.
|
RoClientSessionActivity |
createRoClientSessionActivity(java.lang.String sessionId,
DiameterIdentity destinationHost,
DiameterIdentity destinationRealm)
Deprecated.
This method is unsafe because it is requires the caller to guarantee uniqueness of session IDs. The
createRoClientSessionActivity(org.jainslee.resources.diameter.base.types.DiameterIdentity, org.jainslee.resources.diameter.base.types.DiameterIdentity, String)
method can be used to create a session ID that with additional information appended to a guaranteed-unique session ID. |
CreditControlAnswer |
eventCreditControlRequest(CreditControlRequest ccr)
Send a Credit-Control-Request message to the appropriate peers, and block
until the response is received then return it.
|
DiameterProvider |
getBaseProvider()
Return a base Diameter provider that can be used to create base activities to send extension messages etc.
|
RoMessageFactory |
getRoMessageFactory()
Return a message factory to be used to create concrete implementations of credit control messages and AVPs.
|
CreditControlAnswer |
initialCreditControlRequest(CreditControlRequest ccr)
Send an initial Credit-Control-Request that will start a credit control session,
and block until the answer is received.
|
byte[] |
marshalRoCreditControlAnswer(CreditControlAnswer cca)
Marshal a Credit-Control-Answer into a byte array that can be serialized (e.g., stored in a CMP field).
|
byte[] |
marshalRoCreditControlRequest(CreditControlRequest ccr)
Marshal a Credit-Control-Request into a byte array that can be serialized (e.g., stored in a CMP field).
|
CreditControlAnswer |
terminationCreditControlRequest(CreditControlRequest ccr)
Send a termination Credit-Control-Request and block until the answer is received.
|
CreditControlAnswer |
unmarshalRoCreditControlAnswer(byte[] b)
Unmarshal a Credit-Control-Answer from a byte array.
|
CreditControlRequest |
unmarshalRoCreditControlRequest(byte[] b)
Unmarshal a Credit-Control-Request from a byte array.
|
CreditControlAnswer |
updateCreditControlRequest(CreditControlRequest ccr)
Send an update (intermediate) Credit-Control-Request and block until the answer is received.
|
getConfiguredTGPPVersion, getRoProviderV790, getRoProviderV820, getRoProviderV8d0, getRoProviderV960, getRoProviderVa00, getRoProviderVb80, getRoProviderVcb0
RoMessageFactory getRoMessageFactory()
DiameterProvider getBaseProvider()
RoClientSessionActivity createRoClientSessionActivity() throws CreateActivityException
CreateActivityException
- if the RA could not create the activity for any reasonRoClientSessionActivity createRoClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException
destinationHost
- a destination host to automatically put in all messagesdestinationRealm
- a destination realm to automatically put in all messagesCreateActivityException
- if the RA could not create the activity for any reason@Deprecated RoClientSessionActivity createRoClientSessionActivity(java.lang.String sessionId, DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException
createRoClientSessionActivity(org.jainslee.resources.diameter.base.types.DiameterIdentity, org.jainslee.resources.diameter.base.types.DiameterIdentity, String)
method can be used to create a session ID that with additional information appended to a guaranteed-unique session ID.sessionId
- specifies the session ID of the new activity.destinationHost
- a destination host to automatically put in all messagesdestinationRealm
- a destination realm to automatically put in all messagesCreateActivityException
- if the RA could not create the activity for any reasonRoClientSessionActivity createRoClientSessionActivity(java.lang.String sessionIdOptionalComponent) throws CreateActivityException
sessionIdOptionalComponent
- a string to append to the session ID generated for this activity. The Diameter session ID separator (';') will
be inserted between the generated session ID and the optional component.CreateActivityException
- if the RA could not create the activity for any reasonRoClientSessionActivity createRoClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm, java.lang.String sessionIdOptionalComponent) throws CreateActivityException
destinationHost
- a destination host to automatically put in all messagesdestinationRealm
- a destination realm to automatically put in all messagessessionIdOptionalComponent
- a string to append to the session ID generated for this activity. The Diameter session ID separator (';') will
be inserted between the generated session ID and the optional component.CreateActivityException
- if the RA could not create the activity for any reasonCreditControlAnswer eventCreditControlRequest(CreditControlRequest ccr) throws SendException
See the note regarding synchronous requests in the org.jainslee.resources.diameter.ro
package docs.
ccr
- the CreditControlRequest to sendSendException
- if an error occured sending the request to the peerCreditControlAnswer initialCreditControlRequest(CreditControlRequest ccr) throws SendException
CreditControlMessageFactory.createCreditControlRequest(java.lang.String)
.
See the note regarding synchronous requests in the org.jainslee.resources.diameter.ro
package docs.
ccr
- the CreditControlRequest to sendSendException
- if an error occured sending the request to the peerCreditControlAnswer updateCreditControlRequest(CreditControlRequest ccr) throws SendException
See the note regarding synchronous requests in the org.jainslee.resources.diameter.ro
package docs.
ccr
- the CreditControlRequest to sendSendException
- if an error occured sending the request to the peerjava.lang.IllegalArgumentException
- if the CreditControlRequest does not contain CC-Request-Number and Session-Id AVPsCreditControlAnswer terminationCreditControlRequest(CreditControlRequest ccr) throws SendException
See the note regarding synchronous requests in the org.jainslee.resources.diameter.ro
package docs.
ccr
- the CreditControlRequest to sendSendException
- if an error occured sending the request to the peerjava.lang.IllegalArgumentException
- if the CreditControlRequest does not contain CC-Request-Number and Session-Id AVPsbyte[] marshalRoCreditControlRequest(CreditControlRequest ccr)
ccr
- the Credit-Control-Request to marshalbyte[] marshalRoCreditControlAnswer(CreditControlAnswer cca)
cca
- the Credit-Control-Answer to marshalCreditControlRequest unmarshalRoCreditControlRequest(byte[] b) throws DecodeException, AvpNotAllowedException
b
- the byte array to unmarshalDecodeException
AvpNotAllowedException
CreditControlAnswer unmarshalRoCreditControlAnswer(byte[] b) throws DecodeException, AvpNotAllowedException
b
- the byte array to unmarshalDecodeException
AvpNotAllowedException