public class ServiceOutputConnection extends java.lang.Object implements IOutputConnection
Modifier and Type | Field and Description |
---|---|
protected java.util.List<byte[]> |
buffer
The buffer.
|
protected boolean |
closed
The closed flag.
|
protected IOutputConnection |
con
The remote output connection.
|
protected boolean |
flushed
Flushed flag.
|
protected jadex.commons.future.Future<java.lang.Integer> |
readyfuture
The ready future.
|
protected jadex.commons.ICommand |
transfercommand
The transfer future.
|
Constructor and Description |
---|
ServiceOutputConnection()
Create a new connection.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection.
|
void |
flush()
Flush the data.
|
int |
getConnectionId()
Get the connection id.
|
ITransportComponentIdentifier |
getInitiator()
Get the initiator.
|
IInputConnection |
getInputConnection() |
java.util.Map<java.lang.String,java.lang.Object> |
getNonFunctionalProperties()
Get the non-functional properties of the connection.
|
ITransportComponentIdentifier |
getParticipant()
Get the participant.
|
protected void |
setOutputConnection(IOutputConnection ocon)
Set the real output connection to the other side.
|
jadex.commons.future.IFuture<java.lang.Integer> |
waitForReady()
Wait until the connection is ready for the next write.
|
jadex.commons.future.IFuture<java.lang.Void> |
write(byte[] data)
Write the content to the stream.
|
jadex.commons.future.ISubscriptionIntermediateFuture<java.lang.Long> |
writeFromInputStream(java.io.InputStream is,
IExternalAccess component)
Write all data from input stream to the connection.
|
protected IOutputConnection con
protected boolean closed
protected boolean flushed
protected java.util.List<byte[]> buffer
protected jadex.commons.future.Future<java.lang.Integer> readyfuture
protected jadex.commons.ICommand transfercommand
public ServiceOutputConnection()
public jadex.commons.future.IFuture<java.lang.Void> write(byte[] data)
write
in interface IOutputConnection
data
- The data.public void flush()
flush
in interface IOutputConnection
public jadex.commons.future.IFuture<java.lang.Integer> waitForReady()
waitForReady
in interface IOutputConnection
public void close()
close
in interface IConnection
public int getConnectionId()
IConnection
getConnectionId
in interface IConnection
public ITransportComponentIdentifier getInitiator()
IConnection
getInitiator
in interface IConnection
public ITransportComponentIdentifier getParticipant()
IConnection
getParticipant
in interface IConnection
public java.util.Map<java.lang.String,java.lang.Object> getNonFunctionalProperties()
getNonFunctionalProperties
in interface IConnection
public IInputConnection getInputConnection()
protected void setOutputConnection(IOutputConnection ocon)
public jadex.commons.future.ISubscriptionIntermediateFuture<java.lang.Long> writeFromInputStream(java.io.InputStream is, IExternalAccess component)
writeFromInputStream
in interface IOutputConnection
is
- The input stream.agen
-