Package network.oxalis.api.outbound
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default TransmissionResponsesend(InputStream inputStream)Sends content found in the InputStream.default TransmissionResponsesend(InputStream inputStream, io.opentracing.Span root)Sends content found in the InputStream.TransmissionResponsesend(InputStream inputStream, Tag tag)Sends content found in the InputStream.default TransmissionResponsesend(InputStream inputStream, Tag tag, io.opentracing.Span root)Sends content found in the InputStream.
-
-
-
Method Detail
-
send
default TransmissionResponse send(InputStream inputStream) throws IOException, OxalisTransmissionException, OxalisContentException
Sends content found in the InputStream.- Parameters:
inputStream- InputStream containing content to be sent.- Returns:
- Transmission response containing information from the performed transmission.
- Throws:
IOException- Thrown on any IO exception.OxalisTransmissionException- Thrown if there were any problems making Oxalis unable to send the content.OxalisContentException
-
send
TransmissionResponse send(InputStream inputStream, Tag tag) throws IOException, OxalisTransmissionException, OxalisContentException
Sends content found in the InputStream.- Parameters:
inputStream- InputStream containing content to be sent.tag- Tag defined by client.- Returns:
- Transmission response containing information from the performed transmission.
- Throws:
IOException- Thrown on any IO exception.OxalisTransmissionException- Thrown if there were any problems making Oxalis unable to send the content.OxalisContentException
-
send
default TransmissionResponse send(InputStream inputStream, io.opentracing.Span root) throws IOException, OxalisTransmissionException, OxalisContentException
Sends content found in the InputStream.- Parameters:
inputStream- InputStream containing content to be sent.root- Current trace.- Returns:
- Transmission response containing information from the performed transmission.
- Throws:
IOException- Thrown on any IO exception.OxalisTransmissionException- Thrown if there were any problems making Oxalis unable to send the content.OxalisContentException
-
send
default TransmissionResponse send(InputStream inputStream, Tag tag, io.opentracing.Span root) throws IOException, OxalisTransmissionException, OxalisContentException
Sends content found in the InputStream.- Parameters:
inputStream- InputStream containing content to be sent.tag- Tag defined by client.root- Current trace.- Returns:
- Transmission response containing information from the performed transmission.
- Throws:
IOException- Thrown on any IO exception.OxalisTransmissionException- Thrown if there were any problems making Oxalis unable to send the content.OxalisContentException
-
-