Interface DiameterProvider
-
public interface DiameterProvider
The interface used by an SBB to interact with the Diameter RA.- Author:
- Open Cloud
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccountingClientSessionActivity
createAccountingClientSessionActivity()
Create a new activity to send accounting request messages.AccountingClientSessionActivity
createAccountingClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm)
Create a new activity to send accounting request messages.DiameterActivity
createActivity()
Create a new activity to send and receive Diameter messages.DiameterActivity
createActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm)
Create a new activity to send and receive Diameter messages.DiameterAvp
decodeAvp(byte[] bytes)
Decodes an AVP from a byte array using standard Diameter AVP data formats.byte[]
encodeAvp(DiameterAvp avp)
Encodes an AVP to a byte array using standard Diameter AVP data formats.DiameterMessageFactory
getDiameterMessageFactory()
Return a DiameterMessageFactory implementation to be used to createDiameterMessage
objects.int
getPeerCount()
Return the number of peers this Diameter resource adaptor is connected to.DiameterMessage
sendSyncRequest(DiameterMessage message)
Synchronously send a Diameter request and block until a response is received.
-
-
-
Method Detail
-
getDiameterMessageFactory
DiameterMessageFactory getDiameterMessageFactory()
Return a DiameterMessageFactory implementation to be used to createDiameterMessage
objects.- Returns:
- a DiameterMessageFactory implementation
-
createActivity
DiameterActivity createActivity() throws CreateActivityException
Create a new activity to send and receive Diameter messages.- Returns:
- a DiameterActivity
- Throws:
CreateActivityException
- if the RA could not create the activity for any reason
-
createActivity
DiameterActivity createActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException
Create a new activity to send and receive Diameter messages.- Parameters:
destinationHost
- a destination host to automatically put in all messagesdestinationRealm
- a destination realm to automatically put in all messages- Returns:
- a DiameterActivity
- Throws:
CreateActivityException
- if the RA could not create the activity for any reason
-
createAccountingClientSessionActivity
AccountingClientSessionActivity createAccountingClientSessionActivity() throws CreateActivityException
Create a new activity to send accounting request messages.- Returns:
- a AccountingClientSessionActivity
- Throws:
CreateActivityException
- if the RA could not create the activity for any reason
-
createAccountingClientSessionActivity
AccountingClientSessionActivity createAccountingClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm) throws CreateActivityException
Create a new activity to send accounting request messages.- Parameters:
destinationHost
- a destination host to automatically put in all messagesdestinationRealm
- a destination realm to automatically put in all messages- Returns:
- a AccountingClientSessionActivity
- Throws:
CreateActivityException
- if the RA could not create the activity for any reason
-
sendSyncRequest
DiameterMessage sendSyncRequest(DiameterMessage message) throws SendException
Synchronously send a Diameter request and block until a response is received.See the note regarding synchronous requests in the
org.jainslee.resources.diameter.base
package docs.- Parameters:
message
- the Diameter message to send- Returns:
- the Diameter message containing the response
- Throws:
SendException
-
encodeAvp
byte[] encodeAvp(DiameterAvp avp)
Encodes an AVP to a byte array using standard Diameter AVP data formats.
-
decodeAvp
DiameterAvp decodeAvp(byte[] bytes) throws DecodeException
Decodes an AVP from a byte array using standard Diameter AVP data formats.- Throws:
DecodeException
-
getPeerCount
int getPeerCount()
Return the number of peers this Diameter resource adaptor is connected to.- Returns:
- connected peer count
-
-