Interface MessageGateway<Type>

All Known Subinterfaces:
MailService

public interface MessageGateway<Type>
MessageGateway is an Object capable of sending a message to a recipient. An example of an message would be an Email . This is an ServiceProvider to be used as to register as an OSGI service. Gateways can be accessed via MessageGatewayService. This is used for example by the MailingService to send messages over different Gateways
Since:
5.4
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    handles(Class<? extends Type> type)
    Indicate if the Gateway accepts a Message of the given type
    void
    send(Type message)
     
  • Method Details

    • handles

      boolean handles(Class<? extends Type> type)
      Indicate if the Gateway accepts a Message of the given type
      Parameters:
      type - to test
      Returns:
      true if the Class is of MessageGateway.
    • send

      void send(Type message) throws MailingException
      Parameters:
      message - to send
      Throws:
      MailingException - in case the message can not be sent.