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 IOutputConnectiondata - The data.public void flush()
flush in interface IOutputConnectionpublic jadex.commons.future.IFuture<java.lang.Integer> waitForReady()
waitForReady in interface IOutputConnectionpublic void close()
close in interface IConnectionpublic int getConnectionId()
IConnectiongetConnectionId in interface IConnectionpublic ITransportComponentIdentifier getInitiator()
IConnectiongetInitiator in interface IConnectionpublic ITransportComponentIdentifier getParticipant()
IConnectiongetParticipant in interface IConnectionpublic java.util.Map<java.lang.String,java.lang.Object> getNonFunctionalProperties()
getNonFunctionalProperties in interface IConnectionpublic 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 IOutputConnectionis - The input stream.agen -