public class ServiceInputConnection extends java.lang.Object implements IInputConnection
Modifier and Type | Field and Description |
---|---|
protected boolean |
closed
The closed flag.
|
protected IInputConnection |
con
The remote output connection.
|
protected jadex.commons.future.SubscriptionIntermediateFuture<byte[]> |
future
The buffer.
|
protected jadex.commons.ICommand |
transfercommand
The transfer future.
|
protected jadex.commons.future.ITerminableIntermediateFuture<java.lang.Long> |
transferfuture
The transfer future.
|
Constructor and Description |
---|
ServiceInputConnection()
Create a new service input connection.
|
Modifier and Type | Method and Description |
---|---|
jadex.commons.future.ISubscriptionIntermediateFuture<byte[]> |
aread()
Asynchronous read.
|
int |
available()
Get the number of available bytes.
|
void |
close()
Close the stream.
|
int |
getConnectionId()
Get the connection id.
|
ITransportComponentIdentifier |
getInitiator()
Get the initiator.
|
java.util.Map<java.lang.String,java.lang.Object> |
getNonFunctionalProperties()
Get the non-functional properties of the connection.
|
IOutputConnection |
getOutputConnection()
Get the corresponding output connection.
|
ITransportComponentIdentifier |
getParticipant()
Get the participant.
|
int |
read()
Non-blocking read.
|
int |
read(byte[] buffer)
Non-blocking read.
|
protected void |
setInputConnection(IInputConnection con)
Set the input connection.
|
jadex.commons.future.ISubscriptionIntermediateFuture<java.lang.Long> |
writeToOutputStream(java.io.OutputStream os,
IExternalAccess component)
Read all data from output stream to the connection.
|
protected IInputConnection con
protected boolean closed
protected jadex.commons.future.SubscriptionIntermediateFuture<byte[]> future
protected jadex.commons.future.ITerminableIntermediateFuture<java.lang.Long> transferfuture
protected jadex.commons.ICommand transfercommand
public ServiceInputConnection()
public int read()
read
in interface IInputConnection
public int read(byte[] buffer)
read
in interface IInputConnection
buffer
- The buffer to read in.public jadex.commons.future.ISubscriptionIntermediateFuture<byte[]> aread()
aread
in interface IInputConnection
public int available()
available
in interface IInputConnection
public int getConnectionId()
getConnectionId
in interface IConnection
public void close()
close
in interface IConnection
public ITransportComponentIdentifier getInitiator()
getInitiator
in interface IConnection
public ITransportComponentIdentifier getParticipant()
getParticipant
in interface IConnection
public java.util.Map<java.lang.String,java.lang.Object> getNonFunctionalProperties()
getNonFunctionalProperties
in interface IConnection
protected void setInputConnection(IInputConnection con)
public IOutputConnection getOutputConnection()
public jadex.commons.future.ISubscriptionIntermediateFuture<java.lang.Long> writeToOutputStream(java.io.OutputStream os, IExternalAccess component)
writeToOutputStream
in interface IInputConnection
is
- The input stream.component
- The component.