Interface DiameterProvider
-
public interface DiameterProviderThe 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 AccountingClientSessionActivitycreateAccountingClientSessionActivity()Create a new activity to send accounting request messages.AccountingClientSessionActivitycreateAccountingClientSessionActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm)Create a new activity to send accounting request messages.DiameterActivitycreateActivity()Create a new activity to send and receive Diameter messages.DiameterActivitycreateActivity(DiameterIdentity destinationHost, DiameterIdentity destinationRealm)Create a new activity to send and receive Diameter messages.DiameterAvpdecodeAvp(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.DiameterMessageFactorygetDiameterMessageFactory()Return a DiameterMessageFactory implementation to be used to createDiameterMessageobjects.intgetPeerCount()Return the number of peers this Diameter resource adaptor is connected to.DiameterMessagesendSyncRequest(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 createDiameterMessageobjects.- 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.basepackage 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
-
-