public final class TransmissionNetworkOutput extends java.lang.Object implements TransmissionOutput
Transmission
The class uses Apache's HttpClient framework for that.
Created by gupele on 12/18/2014.Modifier and Type | Method and Description |
---|---|
static TransmissionNetworkOutput |
create(java.lang.String endpoint,
TransmissionPolicyManager transmissionPolicyManager) |
static TransmissionNetworkOutput |
create(TransmissionPolicyManager transmissionPolicyManager) |
boolean |
send(Transmission transmission)
Tries to send a
Transmission
The thread that calls that method might be suspended if there is a throttling issues, in any case
the thread that enters this method is responsive for 'stop' request that might be issued by the application. |
void |
setTransmissionDispatcher(TransmissionDispatcher transmissionDispatcher) |
void |
stop(long timeout,
java.util.concurrent.TimeUnit timeUnit)
Stops all threads from sending data.
|
public static TransmissionNetworkOutput create(TransmissionPolicyManager transmissionPolicyManager)
public static TransmissionNetworkOutput create(java.lang.String endpoint, TransmissionPolicyManager transmissionPolicyManager)
public void setTransmissionDispatcher(TransmissionDispatcher transmissionDispatcher)
public void stop(long timeout, java.util.concurrent.TimeUnit timeUnit)
stop
in interface TransmissionOutput
timeout
- The timeout to wait, which is not relevant here.timeUnit
- The time unit, which is not relevant in this method.public boolean send(Transmission transmission)
Transmission
The thread that calls that method might be suspended if there is a throttling issues, in any case
the thread that enters this method is responsive for 'stop' request that might be issued by the application.send
in interface TransmissionOutput
transmission
- The data to send