Interface DiameterGxProvider

    • Method Detail

      • createGxClientSessionActivity

        GxClientSessionActivity createGxClientSessionActivity​(DiameterIdentity destinationHost,
                                                              DiameterIdentity destinationRealm)
                                                       throws CreateActivityException
        Create a new activity to send and receive Diameter messages. Messages sent on an activity created by this method will automatically have the Destination-Host and Destination-Realm AVPs set to the provided values.
        Parameters:
        destinationHost - a destination host to automatically put in all messages, may be null if not needed
        destinationRealm - a destination realm to automatically put in all messages
        Returns:
        a instance of a GxClientSessionActivity to send credit control messages
        Throws:
        CreateActivityException - if the RA could not create the activity for any reason
        See Also:
        createGxClientSessionActivity()
      • createGxClientSessionActivity

        GxClientSessionActivity createGxClientSessionActivity​(String sessionIdOptionalComponent)
                                                       throws CreateActivityException
        Create a new activity to send and receive Diameter messages.
        Parameters:
        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.
        Returns:
        a DiameterActivity
        Throws:
        CreateActivityException - if the RA could not create the activity for any reason
      • createGxClientSessionActivity

        GxClientSessionActivity createGxClientSessionActivity​(DiameterIdentity destinationHost,
                                                              DiameterIdentity destinationRealm,
                                                              String sessionIdOptionalComponent)
                                                       throws CreateActivityException
        Create a new activity to send and receive Diameter messages.
        Parameters:
        destinationHost - a destination host to automatically put in all messages
        destinationRealm - a destination realm to automatically put in all messages
        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.
        Returns:
        a instance of a GxClientSessionActivity to send credit control messages
        Throws:
        CreateActivityException - if the RA could not create the activity for any reason
      • initialCreditControlRequest

        CreditControlAnswer initialCreditControlRequest​(CreditControlRequest ccr)
                                                 throws SendException
        Send an initial Credit-Control-Request that will start a credit control session, and block until the answer is received. To send subsequent requests for this charging session, you must provide the Session-Id AVP contained in the returned CreditControlAnswer to org.jainslee.resources.diameter.gx.DiameterGxMessageFactory#createGxCreditControlRequest().

        See the note regarding synchronous requests in the org.jainslee.resources.diameter.gx package docs.

        Parameters:
        ccr - the CreditControlRequest to send
        Returns:
        the answer received
        Throws:
        SendException
      • getDiameterGxMessageFactory

        DiameterGxMessageFactory getDiameterGxMessageFactory()
        Return a message factory to be used to create concrete implementations of credit control messages and AVPs
        Returns:
        a CreditControlMessageFactory implementation
      • marshalGxCreditControlRequest

        byte[] marshalGxCreditControlRequest​(CreditControlRequest ccr)
        Marshal a Credit-Control-Request into a byte array that can be serialized (e.g., stored in a CMP field).
        Parameters:
        ccr - the Credit-Control-Request to marshal
        Returns:
        a byte array with the marshalled data
      • marshalGxCreditControlAnswer

        byte[] marshalGxCreditControlAnswer​(CreditControlAnswer cca)
        Marshal a Credit-Control-Answer into a byte array that can be serialized (e.g., stored in a CMP field).
        Parameters:
        cca - the Credit-Control-Answer to marshal
        Returns:
        a byte array with the marshalled data