Class ServiceOutputConnectionProxy
- java.lang.Object
-
- jadex.bridge.service.types.remote.ServiceOutputConnectionProxy
-
- All Implemented Interfaces:
IConnection,IOutputConnection
public class ServiceOutputConnectionProxy extends java.lang.Object implements IOutputConnection
-
-
Field Summary
Fields Modifier and Type Field Description protected ServiceInputConnectionconThe original connection.protected intconidThe connection id.protected IComponentIdentifierinitiatorThe initiator id.protected java.util.Map<java.lang.String,java.lang.Object>nonfuncThe non-functional properties.protected IComponentIdentifierparticipantThe participant id.
-
Constructor Summary
Constructors Constructor Description ServiceOutputConnectionProxy()Create a new connection proxyServiceOutputConnectionProxy(ServiceInputConnection con)Create a new connection proxy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the connection.voidflush()Flush the data.intgetConnectionId()Get the connectionid.IComponentIdentifiergetInitiator()Get the initiator id.java.util.Map<java.lang.String,java.lang.Object>getNonFunctionalProperties()Get the non-functional properties of the connection.IComponentIdentifiergetParticipant()Get the participant id.voidsetConnectionId(int conid)Set the connectionid.voidsetInitiator(IComponentIdentifier initiator)Set the initiator.voidsetInputConnection(IInputConnection icon)voidsetNonFunctionalProperties(java.util.Map<java.lang.String,java.lang.Object> nonfunc)Set the non-functional properties of the connection.voidsetParticipant(IComponentIdentifier participant)Set the participant.IFuture<java.lang.Integer>waitForReady()Wait until the connection is ready for the next write.IFuture<java.lang.Void>write(byte[] data)Write the content to the stream.ISubscriptionIntermediateFuture<java.lang.Long>writeFromInputStream(java.io.InputStream is, IExternalAccess component)Do write all data from the input stream.
-
-
-
Field Detail
-
con
protected ServiceInputConnection con
The original connection.
-
conid
protected int conid
The connection id.
-
initiator
protected IComponentIdentifier initiator
The initiator id.
-
participant
protected IComponentIdentifier participant
The participant id.
-
nonfunc
protected java.util.Map<java.lang.String,java.lang.Object> nonfunc
The non-functional properties.
-
-
Constructor Detail
-
ServiceOutputConnectionProxy
public ServiceOutputConnectionProxy()
Create a new connection proxy
-
ServiceOutputConnectionProxy
public ServiceOutputConnectionProxy(ServiceInputConnection con)
Create a new connection proxy
-
-
Method Detail
-
setInputConnection
public void setInputConnection(IInputConnection icon)
-
getConnectionId
public int getConnectionId()
Get the connectionid.- Specified by:
getConnectionIdin interfaceIConnection- Returns:
- The connectionid.
-
setConnectionId
public void setConnectionId(int conid)
Set the connectionid.- Parameters:
connectionid- The connectionid to set.
-
getInitiator
public IComponentIdentifier getInitiator()
Get the initiator id.- Specified by:
getInitiatorin interfaceIConnection- Returns:
- The initiator id.
-
setInitiator
public void setInitiator(IComponentIdentifier initiator)
Set the initiator.- Parameters:
initiator- The initiator to set.
-
getParticipant
public IComponentIdentifier getParticipant()
Get the participant id.- Specified by:
getParticipantin interfaceIConnection- Returns:
- The participant id.
-
setParticipant
public void setParticipant(IComponentIdentifier participant)
Set the participant.- Parameters:
participant- The participant to set.
-
getNonFunctionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getNonFunctionalProperties()
Get the non-functional properties of the connection.- Specified by:
getNonFunctionalPropertiesin interfaceIConnection- Returns:
- The properties.
-
setNonFunctionalProperties
public void setNonFunctionalProperties(java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Set the non-functional properties of the connection.- Parameters:
nonfunc- The properties.
-
write
public IFuture<java.lang.Void> write(byte[] data)
Write the content to the stream.- Specified by:
writein interfaceIOutputConnection- Parameters:
data- The data.
-
flush
public void flush()
Flush the data.- Specified by:
flushin interfaceIOutputConnection
-
waitForReady
public IFuture<java.lang.Integer> waitForReady()
Wait until the connection is ready for the next write.- Specified by:
waitForReadyin interfaceIOutputConnection- Returns:
- Calls future when next data can be written.
-
close
public void close()
Close the connection.- Specified by:
closein interfaceIConnection
-
writeFromInputStream
public ISubscriptionIntermediateFuture<java.lang.Long> writeFromInputStream(java.io.InputStream is, IExternalAccess component)
Do write all data from the input stream.- Specified by:
writeFromInputStreamin interfaceIOutputConnection- Parameters:
is- The input stream.
-
-