Search in sources :

Example 11 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class AbstractMessageSender method setReplyToAddress.

protected synchronized void setReplyToAddress(String replyToAddress) {
    this.replyToAddress = replyToAddress;
    for (MutableMessage queuedMessage : noReplyToAddressQueue) {
        queuedMessage.setReplyTo(replyToAddress);
        routeMutableMessage(queuedMessage);
    }
    noReplyToAddressQueue.clear();
}
Also used : MutableMessage(joynr.MutableMessage)

Example 12 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class DispatcherImpl method sendSubscriptionRequest.

// CHECKSTYLE:ON
@Override
public void sendSubscriptionRequest(String fromParticipantId, Set<DiscoveryEntryWithMetaInfo> toDiscoveryEntries, SubscriptionRequest subscriptionRequest, MessagingQos messagingQos) {
    for (DiscoveryEntryWithMetaInfo toDiscoveryEntry : toDiscoveryEntries) {
        MutableMessage message = messageFactory.createSubscriptionRequest(fromParticipantId, toDiscoveryEntry.getParticipantId(), subscriptionRequest, messagingQos);
        message.setLocalMessage(toDiscoveryEntry.getIsLocal());
        if (subscriptionRequest instanceof MulticastSubscriptionRequest) {
            String multicastId = ((MulticastSubscriptionRequest) subscriptionRequest).getMulticastId();
            messageRouter.addMulticastReceiver(multicastId, fromParticipantId, toDiscoveryEntry.getParticipantId());
        }
        logger.debug("Send SubscriptionRequest: subscriptionId: {}, messageId: {}, proxy participantId: {}, provider participantId: {}", subscriptionRequest.getSubscriptionId(), message.getId(), fromParticipantId, toDiscoveryEntry.getParticipantId());
        messageSender.sendMessage(message);
    }
}
Also used : MutableMessage(joynr.MutableMessage) DiscoveryEntryWithMetaInfo(joynr.types.DiscoveryEntryWithMetaInfo) MulticastSubscriptionRequest(joynr.MulticastSubscriptionRequest)

Example 13 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class DispatcherImpl method sendSubscriptionStop.

@Override
public void sendSubscriptionStop(String fromParticipantId, Set<DiscoveryEntryWithMetaInfo> toDiscoveryEntries, SubscriptionStop subscriptionStop, MessagingQos messagingQos) {
    for (DiscoveryEntryWithMetaInfo toDiscoveryEntry : toDiscoveryEntries) {
        MutableMessage message = messageFactory.createSubscriptionStop(fromParticipantId, toDiscoveryEntry.getParticipantId(), subscriptionStop, messagingQos);
        message.setLocalMessage(toDiscoveryEntry.getIsLocal());
        logger.debug("UNREGISTER SUBSCRIPTION call proxy: subscriptionId: {}, messageId: {}, proxy participantId: {}, " + "provider participantId: {}", subscriptionStop.getSubscriptionId(), message.getId(), fromParticipantId, toDiscoveryEntry.getParticipantId());
        messageSender.sendMessage(message);
    }
}
Also used : MutableMessage(joynr.MutableMessage) DiscoveryEntryWithMetaInfo(joynr.types.DiscoveryEntryWithMetaInfo)

Example 14 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class DispatcherImpl method sendSubscriptionReply.

@Override
public void sendSubscriptionReply(final String fromParticipantId, final String toParticipantId, SubscriptionReply subscriptionReply, MessagingQos messagingQos) {
    MutableMessage message = messageFactory.createSubscriptionReply(fromParticipantId, toParticipantId, subscriptionReply, messagingQos);
    messageSender.sendMessage(message);
}
Also used : MutableMessage(joynr.MutableMessage)

Example 15 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class DispatcherImpl method sendMulticast.

@Override
public void sendMulticast(String fromParticipantId, MulticastPublication multicastPublication, MessagingQos messagingQos) {
    MutableMessage message = messageFactory.createMulticast(fromParticipantId, multicastPublication, messagingQos);
    messageSender.sendMessage(message);
}
Also used : MutableMessage(joynr.MutableMessage)

Aggregations

MutableMessage (joynr.MutableMessage)60 Test (org.junit.Test)35 MessagingQos (io.joynr.messaging.MessagingQos)15 ImmutableMessage (joynr.ImmutableMessage)9 MulticastSubscriptionRequest (joynr.MulticastSubscriptionRequest)7 SubscriptionRequest (joynr.SubscriptionRequest)6 Request (joynr.Request)5 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 Reply (joynr.Reply)4 Injector (com.google.inject.Injector)3 JoynrMessageProcessor (io.joynr.messaging.JoynrMessageProcessor)3 BroadcastSubscriptionRequest (joynr.BroadcastSubscriptionRequest)3 MulticastPublication (joynr.MulticastPublication)3 OneWayRequest (joynr.OneWayRequest)3 DiscoveryEntryWithMetaInfo (joynr.types.DiscoveryEntryWithMetaInfo)3 InvocationOnMock (org.mockito.invocation.InvocationOnMock)3 AbstractModule (com.google.inject.AbstractModule)2 TypeLiteral (com.google.inject.TypeLiteral)2 Multibinder (com.google.inject.multibindings.Multibinder)2 JoynrPropertiesModule (io.joynr.common.JoynrPropertiesModule)2