JBoss.orgCommunity Documentation

Chapter 2. Resource Adaptor Type

2.1. Activities
2.2. Events
2.3. Activity Context Interface Factory
2.4. Resource Adaptor Interface
2.5. Restrictions
2.6. Sbb Code Examples

Diameter Rf Resource Adaptor Type is defined by Mobicents team as part of effort to standardize RA Types.

Diameter Rf Type 2.1.0.FINAL defines the following Activities:

net.java.slee.resource.diameter.rf.RfClientSession

This type of activity represents client side of Rf session. Accounting-Request (ACR) messages can be created and sent in this Activity, receiving the respective Answer (or timeout) later on this Activity.

This activity type can be created with call to the proper createRfClientSessionActivity method of net.java.slee.resource.diameter.rf.RfProvider. It ends once underlying Base Accounting session ends.

State machines for client Rf are based on Base Accounting client sessions which can be found at Section 8.2 of Diameter Base Protocol RFC.

net.java.slee.resource.diameter.rf.RfServerSession

This type of activity represents server side of Rf session. Accounting-Request (ACR) are received in this Activity and respective Answers are sent from it.

This activity type is implicitly created by the Resource Adaptor upon reception of the Accounting-Request message. It ends once underlying Base Accounting session ends.

State machines for client Rf are based on Base Accounting client sessions which can be found at Section 8.2 of Diameter Base Protocol RFC.

All activities define methods required to properly function and expose necessary information to JAIN SLEE services. Rf Server Activity is defined as follows:



    public AccountingAnswer createRfAccountingAnswer();
    public AccountingAnswer createRfAccountingAnswer(AccountingRequest acr);
    public void sendAccountingAnswer(AccountingAnswer accountingAnswer)
        throws IOException, IllegalArgumentException;
    
public AccountingAnswer createRfAccountingAnswer();

This method creates an Accounting-Answer with the Acct-Application-Id set to 3.

public AccountingAnswer createRfAccountingAnswer(AccountingRequest acr);

This method creates an Accounting-Answer with some AVPs populated from the provided Accounting-Request.

The ACA will contain the AVPs specified in createRfAccountingAnswer() and the following AVPs from the Accounting-Request:

  • Accounting-Record-Type
  • Accounting-Record-Number

public void sendAccountingAnswer(AccountingAnswer accountingAnswer) throws IOException, IllegalArgumentException;

This method sends an Accounting Answer.

Rf Client Activity is defined as follows:



        public void sendAccountingRequest(AccountingRequest accountingRequest)
            throws IOException, IllegalArgumentException;
    
public void sendAccountingRequest(AccountingRequest accountingRequest) throws IOException, IllegalArgumentException;

This method sends an Accounting Request.

Note

It is safe to type cast all the mentioned Diameter Activities to it's super interface net.java.slee.resource.diameter.base.DiameterActivity defined in Diameter Base Activities section.

Diameter Rf Resource Adaptor Type declares the Base Accounting Application specific events, ie, Accounting-Request/Answer.

The following tables shows which events are fired on each activity.



Important

Spaces where introduced in Name and Event Class column values, to correctly render the table. Please remove them when using copy/paste.

The JBoss Communications Diameter Rf Activity Context Interface Factory is defined as follows:



    package net.java.slee.resource.diameter.rf;
    import javax.slee.ActivityContextInterface;
    public interface RfActivityContextInterfaceFactory {
        public ActivityContextInterface getActivityContextInterface(RfClientSession cSession);
        public ActivityContextInterface getActivityContextInterface(RfServerSession sSession);
    }
    

The JBoss Communications Diameter Rf Resource Adaptor SBB Interface provides SBBs with access to the Diameter objects required for creating and sending messages. It is defined as follows:



    package net.java.slee.resource.diameter.rf;
    import java.io.IOException;
    import net.java.slee.resource.diameter.base.CreateActivityException;
    import net.java.slee.resource.diameter.base.events.AccountingAnswer;
    import net.java.slee.resource.diameter.base.events.AccountingRequest;
    import net.java.slee.resource.diameter.base.events.avp.DiameterIdentity;
    public interface RfProvider {
        public RfMessageFactory getRfMessageFactory();
        public RfClientSession createRfClientSessionActivity() throws CreateActivityException;
        public RfClientSession createRfClientSessionActivity(DiameterIdentity destinationHost,
            DiameterIdentity destinationRealm) throws CreateActivityException;
        public AccountingAnswer sendAccountingRequest(AccountingRequest accountingRequest)
            throws IllegalArgumentException, IOException;
        DiameterIdentity[] getConnectedPeers();
        int getPeerCount();
    }
    

Current Resource Adaptor Type has no defined restrictions.

TODO