Search in sources :

Example 1 with ProxyInfoAvp

use of net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp in project jain-slee.diameter by RestComm.

the class BaseFactoriesTest method testAvpFactoryCreateProxyInfo.

@Test
public void testAvpFactoryCreateProxyInfo() {
    ProxyInfoAvp piAvp1 = avpFactory.createProxyInfo(new DiameterIdentity("diameter.mobicents.org"), "INITIALIZED".getBytes());
    Assert.assertNotNull("Created Proxy-Info AVP from objects should not be null.", piAvp1);
    ProxyInfoAvp piAvp2 = avpFactory.createProxyInfo(piAvp1.getExtensionAvps());
    Assert.assertEquals("Created Proxy-Info AVP from extension avps should be equal to original.", piAvp1, piAvp2);
    ProxyInfoAvp piAvp3 = avpFactory.createProxyInfo(piAvp2.getProxyHost(), piAvp2.getProxyState());
    Assert.assertEquals("Created Proxy-Info AVP from getters should be equal to original.", piAvp1, piAvp3);
}
Also used : DiameterIdentity(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity) ProxyInfoAvp(net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp) Test(org.junit.Test)

Example 2 with ProxyInfoAvp

use of net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp in project jain-slee.diameter by RestComm.

the class DiameterAvpFactoryImpl method createProxyInfo.

/*
   * (non-Javadoc)
   * @see net.java.slee.resource.diameter.base.DiameterAvpFactory#createProxyInfo(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity, byte[])
   */
public ProxyInfoAvp createProxyInfo(DiameterIdentity proxyHost, byte[] proxyState) {
    ProxyInfoAvp proxyInfo = createProxyInfo();
    proxyInfo.setProxyHost(proxyHost);
    proxyInfo.setProxyState(proxyState);
    return proxyInfo;
}
Also used : ProxyInfoAvp(net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp)

Aggregations

ProxyInfoAvp (net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp)2 DiameterIdentity (net.java.slee.resource.diameter.base.events.avp.DiameterIdentity)1 Test (org.junit.Test)1