Search in sources :

Example 11 with ProviderQos

use of joynr.types.ProviderQos in project joynr by bmwcarit.

the class GlobalCapabilitiesDirectoryEjbTest method setup.

@Before
public void setup() throws NoSuchFieldException, IllegalAccessException {
    Field field = CapabilityUtils.class.getDeclaredField("objectMapper");
    field.setAccessible(true);
    field.set(CapabilityUtils.class, new ObjectMapper());
    testParticpantId = "participantId";
    testGlobalDiscoveryEntry = CapabilityUtils.newGlobalDiscoveryEntry(new Version(0, 1), "domain", "interfaceName", testParticpantId, new ProviderQos(), System.currentTimeMillis(), System.currentTimeMillis() + 1000L, "public key ID", new MqttAddress("tcp://mqttbroker:1883", TOPIC_NAME));
}
Also used : Field(java.lang.reflect.Field) Version(joynr.types.Version) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ProviderQos(joynr.types.ProviderQos) MqttAddress(joynr.system.RoutingTypes.MqttAddress) Before(org.junit.Before)

Example 12 with ProviderQos

use of joynr.types.ProviderQos in project joynr by bmwcarit.

the class GlobalDiscoveryEntryPersisted method setProviderQosPersisted.

public void setProviderQosPersisted(ProviderQosPersisted providerQosPersisted) {
    this.providerQosPersisted = providerQosPersisted;
    super.setQos(new ProviderQos(providerQosPersisted));
}
Also used : ProviderQos(joynr.types.ProviderQos)

Example 13 with ProviderQos

use of joynr.types.ProviderQos in project joynr by bmwcarit.

the class BroadcastEnd2EndTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    final int port = ServletUtil.findFreePort();
    webSocketConfig = new Properties();
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_HOST, "localhost");
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PORT, "" + port);
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PROTOCOL, "ws");
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PATH, "");
    providerQos = new ProviderQos(new CustomParameter[0], System.currentTimeMillis(), ProviderScope.LOCAL, false);
    discoveryQos = new DiscoveryQos(10000, ArbitrationStrategy.HighestPriority, Long.MAX_VALUE, DiscoveryScope.LOCAL_ONLY);
    // init websocket properties before libjoynr runtimes are created
    super.setUp();
// Uncomment to log the verbose android logs to stdout
// ShadowLog.stream = System.out;
}
Also used : Properties(java.util.Properties) CustomParameter(joynr.types.CustomParameter) ProviderQos(joynr.types.ProviderQos) DiscoveryQos(io.joynr.arbitration.DiscoveryQos) Before(org.junit.Before)

Example 14 with ProviderQos

use of joynr.types.ProviderQos in project joynr by bmwcarit.

the class ProviderProxyEnd2EndTest method baseSetup.

@Override
@Before
public void baseSetup() throws Exception {
    final int port = ServletUtil.findFreePort();
    webSocketConfig = new Properties();
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_HOST, "localhost");
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PORT, "" + port);
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PROTOCOL, "ws");
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PATH, "");
    testProviderQos = new ProviderQos(new CustomParameter[0], System.currentTimeMillis(), ProviderScope.LOCAL, false);
    discoveryQos = new DiscoveryQos(10000, ArbitrationStrategy.HighestPriority, Long.MAX_VALUE, DiscoveryScope.LOCAL_ONLY);
    // init websocket properties before libjoynr runtimes are created
    super.baseSetup();
// Uncomment to log the verbose android logs to stdout
// ShadowLog.stream = System.out;
}
Also used : Properties(java.util.Properties) CustomParameter(joynr.types.CustomParameter) ProviderQos(joynr.types.ProviderQos) DiscoveryQos(io.joynr.arbitration.DiscoveryQos) Before(org.junit.Before)

Example 15 with ProviderQos

use of joynr.types.ProviderQos in project joynr by bmwcarit.

the class SubscriptionEnd2EndTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    final int port = ServletUtil.findFreePort();
    webSocketConfig = new Properties();
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_HOST, "localhost");
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PORT, "" + port);
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PROTOCOL, "ws");
    webSocketConfig.setProperty(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_PATH, "");
    providerQos = new ProviderQos(new CustomParameter[0], System.currentTimeMillis(), ProviderScope.LOCAL, false);
    discoveryQos = new DiscoveryQos(10000, ArbitrationStrategy.HighestPriority, Long.MAX_VALUE, DiscoveryScope.LOCAL_ONLY);
    super.setUp();
// Uncomment to log the verbose android logs to stdout
// ShadowLog.stream = System.out;
}
Also used : Properties(java.util.Properties) CustomParameter(joynr.types.CustomParameter) ProviderQos(joynr.types.ProviderQos) DiscoveryQos(io.joynr.arbitration.DiscoveryQos) Before(org.junit.Before)

Aggregations

ProviderQos (joynr.types.ProviderQos)69 Version (joynr.types.Version)43 Test (org.junit.Test)37 GlobalDiscoveryEntry (joynr.types.GlobalDiscoveryEntry)27 DiscoveryEntry (joynr.types.DiscoveryEntry)25 DiscoveryEntryWithMetaInfo (joynr.types.DiscoveryEntryWithMetaInfo)24 DiscoveryQos (io.joynr.arbitration.DiscoveryQos)21 Matchers.anyString (org.mockito.Matchers.anyString)16 ArrayList (java.util.ArrayList)15 ChannelAddress (joynr.system.RoutingTypes.ChannelAddress)13 Before (org.junit.Before)13 Callback (io.joynr.proxy.Callback)12 HashSet (java.util.HashSet)11 MqttAddress (joynr.system.RoutingTypes.MqttAddress)10 InvocationOnMock (org.mockito.invocation.InvocationOnMock)10 Address (joynr.system.RoutingTypes.Address)9 JoynrRuntimeException (io.joynr.exceptions.JoynrRuntimeException)8 MessagingQos (io.joynr.messaging.MessagingQos)8 Properties (java.util.Properties)8 DiscoveryException (io.joynr.exceptions.DiscoveryException)7