Interface TransmissionService

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface TransmissionService
    Defines a standardized transmission service interface accepting the InputStream of the content to be sent.

    Typical implementation:

     
     public TransmissionResponse send(InputStream inputStream) throws IOException, OxalisTransmissionException {
          TransmissionRequestFactory transmissionRequestFactory = // Fetch or find locally.
          TransmissionRequest transmissionRequest = transmissionRequestFactory.newInstance(inputStream);
    
          Transmitter transmitter = // Fetch or find locally.
          TransmissionResponse transmissionResponse = transmitter.transmit(transmissionRequest)
    
          return transmissionResponse;
     }
     
     
    Since:
    4.0.0
    Author:
    erlend