Search in sources :

Example 36 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class DispatcherImpl method sendSubscriptionPublication.

@Override
public void sendSubscriptionPublication(String fromParticipantId, Set<String> toParticipantIds, SubscriptionPublication publication, MessagingQos messagingQos) {
    for (String toParticipantId : toParticipantIds) {
        MutableMessage message = messageFactory.createPublication(fromParticipantId, toParticipantId, publication, messagingQos);
        messageSender.sendMessage(message);
    }
}
Also used : MutableMessage(joynr.MutableMessage)

Example 37 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class DispatcherImpl method sendReply.

public void sendReply(final String fromParticipantId, final String toParticipantId, Reply reply, final long expiryDateMs, Map<String, String> customHeaders, final boolean compress) throws IOException {
    MessagingQos messagingQos = new MessagingQos(expiryDateMs);
    messagingQos.getCustomMessageHeaders().putAll(customHeaders);
    messagingQos.setCompress(compress);
    MutableMessage message = messageFactory.createReply(fromParticipantId, toParticipantId, reply, messagingQos);
    messageSender.sendMessage(message);
}
Also used : MessagingQos(io.joynr.messaging.MessagingQos) MutableMessage(joynr.MutableMessage)

Example 38 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class MutableMessageFactory method createSubscriptionReply.

public MutableMessage createSubscriptionReply(final String fromParticipantId, final String toParticipantId, SubscriptionReply subscriptionReply, MessagingQos messagingQos) {
    MutableMessage msg = createMessage(Message.VALUE_MESSAGE_TYPE_SUBSCRIPTION_REPLY, fromParticipantId, toParticipantId, subscriptionReply, messagingQos);
    addRequestReplyIdCustomHeader(msg, subscriptionReply.getSubscriptionId());
    return msg;
}
Also used : MutableMessage(joynr.MutableMessage)

Example 39 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class MutableMessageFactory method createSubscriptionStop.

public MutableMessage createSubscriptionStop(String fromParticipantId, String toParticipantId, SubscriptionStop subscriptionStop, MessagingQos messagingQos) {
    MutableMessage msg = createMessage(Message.VALUE_MESSAGE_TYPE_SUBSCRIPTION_STOP, fromParticipantId, toParticipantId, subscriptionStop, messagingQos);
    addRequestReplyIdCustomHeader(msg, subscriptionStop.getSubscriptionId());
    return msg;
}
Also used : MutableMessage(joynr.MutableMessage)

Example 40 with MutableMessage

use of joynr.MutableMessage in project joynr by bmwcarit.

the class MutableMessageFactory method createReply.

public MutableMessage createReply(final String fromParticipantId, final String toParticipantId, Reply reply, MessagingQos messagingQos) {
    MutableMessage msg = createMessage(Message.VALUE_MESSAGE_TYPE_REPLY, fromParticipantId, toParticipantId, reply, messagingQos, false);
    addRequestReplyIdCustomHeader(msg, reply.getRequestReplyId());
    return msg;
}
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