Search in sources :

Example 46 with ControlledBounceProxyInformation

use of io.joynr.messaging.info.ControlledBounceProxyInformation in project joynr by bmwcarit.

the class InMemoryBounceProxyDirectoryTest method testGetAssignableBounceProxies.

@Test
public void testGetAssignableBounceProxies() {
    directory.addBounceProxy(new ControlledBounceProxyInformation("A1.B1", null));
    directory.addBounceProxy(new ControlledBounceProxyInformation("A2.B2", null));
    directory.addBounceProxy(new ControlledBounceProxyInformation("A3.B3", null));
    List<BounceProxyRecord> bounceProxies = directory.getAssignableBounceProxies();
    Assert.assertThat(bounceProxies, Matchers.hasItem(hasId("A1.B1")));
    Assert.assertThat(bounceProxies, Matchers.hasItem(hasId("A2.B2")));
    Assert.assertThat(bounceProxies, Matchers.hasItem(hasId("A3.B3")));
    assertEquals(3, bounceProxies.size());
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation) Test(org.junit.Test)

Example 47 with ControlledBounceProxyInformation

use of io.joynr.messaging.info.ControlledBounceProxyInformation in project joynr by bmwcarit.

the class MonitoringServiceImpl method register.

@Override
public void register(String bpId, String urlForCc, String urlForBpc) {
    if (!bounceProxyDirectory.containsBounceProxy(bpId)) {
        ControlledBounceProxyInformation bpInfo = new ControlledBounceProxyInformation(bpId, URI.create(urlForCc), URI.create(urlForBpc));
        bounceProxyDirectory.addBounceProxy(bpInfo);
    }
}
Also used : ControlledBounceProxyInformation(io.joynr.messaging.info.ControlledBounceProxyInformation)

Aggregations

ControlledBounceProxyInformation (io.joynr.messaging.info.ControlledBounceProxyInformation)47 Test (org.junit.Test)44 BounceProxyRecord (io.joynr.messaging.bounceproxy.controller.directory.BounceProxyRecord)13 IsCreateChannelHttpRequest (io.joynr.messaging.bounceproxy.IsCreateChannelHttpRequest)5 JoynrProtocolException (io.joynr.messaging.bounceproxy.controller.exception.JoynrProtocolException)5 BounceProxyStatusInformation (io.joynr.messaging.info.BounceProxyStatusInformation)5 Channel (io.joynr.messaging.info.Channel)5 HttpResponse (org.apache.http.HttpResponse)5 HttpContext (org.apache.http.protocol.HttpContext)5 URI (java.net.URI)4 BounceProxyInformation (io.joynr.messaging.info.BounceProxyInformation)2 BounceProxyStatus (io.joynr.messaging.info.BounceProxyStatus)2 PerformanceMeasures (io.joynr.messaging.info.PerformanceMeasures)2 JoynrCommunicationException (io.joynr.exceptions.JoynrCommunicationException)1 JoynrRuntimeException (io.joynr.exceptions.JoynrRuntimeException)1 IOException (java.io.IOException)1 EntityManager (javax.persistence.EntityManager)1 EntityTransaction (javax.persistence.EntityTransaction)1 Query (javax.persistence.Query)1 HttpException (org.apache.http.HttpException)1