Interface Transport<C extends GeneralTransportConfigurationType>
-
- Type Parameters:
C
- configuration type related to the transport
public interface Transport<C extends GeneralTransportConfigurationType>
Contract for a message transport instance, which is mostly SPI type contract. Transport should not be used directly,TransportService
should be used instead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
configure(C configuration, @NotNull TransportSupport transportSupport)
Configures transport instance - this must be fast and exception free.C
getConfiguration()
String
getDefaultRecipientAddress(FocusType recipient)
String
getName()
void
send(Message message, String transportName, Event event, Task task, OperationResult parentResult)
Sends the message via this transport.
-
-
-
Method Detail
-
configure
void configure(@NotNull C configuration, @NotNull @NotNull TransportSupport transportSupport)
Configures transport instance - this must be fast and exception free. This is not the place to start any connections or sessions; this is called after sysconfig is changed.- Parameters:
configuration
- portion of the configuration relevant to this transporttransportSupport
- support object with dependencies
-
send
void send(Message message, @Deprecated String transportName, Event event, Task task, OperationResult parentResult)
Sends the message via this transport. TODO: * transportName is used only by some legacy transports when key:subname style is used, it will be removed; * event should be delivered differently, for other message sources (e.g. report email) there is no event, but there may be other object of interest (the report itself?); * it would be best to deliver some "context" information to facilitate customizations on various levels, e.g. to inform that notifications need to be redirected to different file than configured in the transport config.
-
getName
String getName()
-
getConfiguration
C getConfiguration()
-
-