Errai 3.0.1-SNAPSHOT

org.jboss.errai.ioc.support.bus.client
Interface Sender<T>

All Known Implementing Classes:
ErraiMessageSender

public interface Sender<T>

An interface that can be used as the injection point for a convenience object that sends single-payload messages to a given subject.

Injection of a sender must be qualified with ToSubject and optionally ReplyTo.

Example:

  @Inject
  @ToSubject("ListCapitializationService")
  @ReplyTo("ClientListService")
  Sender<String> listSender;
 

Author:
Mike Brock, Jonathan Fuerth , Christian Sadilek

Method Summary
 void send(T value)
          Sends the message to the subject specified by ToSubject.
 void send(T value, ErrorCallback errorCallback)
          Sends the message to the subject specified by ToSubject.
 void send(T value, MessageCallback replyTo)
          Sends the message to the subject specified by ToSubject.
 void send(T value, MessageCallback replyTo, ErrorCallback errorCallback)
          Sends the message to the subject specified by ToSubject.
 

Method Detail

send

void send(T value)
Sends the message to the subject specified by ToSubject.

Parameters:
value - the payload of the message stored in MessageParts.Value

send

void send(T value,
          ErrorCallback errorCallback)
Sends the message to the subject specified by ToSubject.

Parameters:
value - the payload of the message stored in MessageParts.Value
errorCallback - a callback to be registered to handle errors when sending the message

send

void send(T value,
          MessageCallback replyTo)
Sends the message to the subject specified by ToSubject.

Parameters:
value - the payload of the message stored in MessageParts.Value
replyTo - a callback to be registered to handle a reply from the remote service

send

void send(T value,
          MessageCallback replyTo,
          ErrorCallback errorCallback)
Sends the message to the subject specified by ToSubject.

Parameters:
value - the payload of the message stored in MessageParts.Value
replyTo - a callback to be registered to handle a reply from the remote service
errorCallback - a callback to be registered to handle errors when sending the message

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.