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 ServiceInputConnection
con
The original connection.protected int
conid
The connection id.protected IComponentIdentifier
initiator
The initiator id.protected java.util.Map<java.lang.String,java.lang.Object>
nonfunc
The non-functional properties.protected IComponentIdentifier
participant
The 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 void
close()
Close the connection.void
flush()
Flush the data.int
getConnectionId()
Get the connectionid.IComponentIdentifier
getInitiator()
Get the initiator id.java.util.Map<java.lang.String,java.lang.Object>
getNonFunctionalProperties()
Get the non-functional properties of the connection.IComponentIdentifier
getParticipant()
Get the participant id.void
setConnectionId(int conid)
Set the connectionid.void
setInitiator(IComponentIdentifier initiator)
Set the initiator.void
setInputConnection(IInputConnection icon)
void
setNonFunctionalProperties(java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Set the non-functional properties of the connection.void
setParticipant(IComponentIdentifier participant)
Set the participant.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)
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:
getConnectionId
in 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:
getInitiator
in 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:
getParticipant
in 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:
getNonFunctionalProperties
in 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 jadex.commons.future.IFuture<java.lang.Void> write(byte[] data)
Write the content to the stream.- Specified by:
write
in interfaceIOutputConnection
- Parameters:
data
- The data.
-
flush
public void flush()
Flush the data.- Specified by:
flush
in interfaceIOutputConnection
-
waitForReady
public jadex.commons.future.IFuture<java.lang.Integer> waitForReady()
Wait until the connection is ready for the next write.- Specified by:
waitForReady
in interfaceIOutputConnection
- Returns:
- Calls future when next data can be written.
-
close
public void close()
Close the connection.- Specified by:
close
in interfaceIConnection
-
writeFromInputStream
public jadex.commons.future.ISubscriptionIntermediateFuture<java.lang.Long> writeFromInputStream(java.io.InputStream is, IExternalAccess component)
Do write all data from the input stream.- Specified by:
writeFromInputStream
in interfaceIOutputConnection
- Parameters:
is
- The input stream.
-
-