public class StreamSendTask extends AbstractSendTask implements ISendTask
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACKCLOSE
Acknowledge the close message.
|
static byte |
ACKCLOSE_INPUT_INITIATOR
Ack for close - from initiator .
|
static byte |
ACKCLOSE_OUTPUT_PARTICIPANT
Ack data/close - from participant .
|
static java.lang.String |
ACKCLOSEREQ
Acknowledge the close request.
|
static byte |
ACKCLOSEREQ_INPUT_PARTICIPANT
Ack for close request - from initiator .
|
static byte |
ACKCLOSEREQ_OUTPUT_INITIATOR
Ack for close request - from initiator .
|
static java.lang.String |
ACKDATA
Acknowledge data message.
|
static byte |
ACKDATA_INPUT_INITIATOR
Ack data - from participant .
|
static byte |
ACKDATA_OUTPUT_PARTICIPANT
Ack data/close - from participant .
|
static java.lang.String |
ACKINIT
Acknowledge init.
|
static byte |
ACKINIT_INPUT_PARTICIPANT
Ack the init - from participant.
|
static byte |
ACKINIT_OUTPUT_PARTICIPANT
Ack the init - from initiator.
|
static java.lang.String |
ALIVE
The alive message.
|
static byte |
ALIVE_INITIATOR
Alive message - from initiator.
|
static byte |
ALIVE_PARTICIPANT
Alive message - from participant.
|
static java.lang.String |
CLOSE
Close the connection.
|
static byte |
CLOSE_INPUT_PARTICIPANT
Close connection - from participant.
|
static byte |
CLOSE_OUTPUT_INITIATOR
Close connection - from initiator.
|
static java.lang.String |
CLOSEREQ
Close request (from participant which cannot close itself).
|
static byte |
CLOSEREQ_INPUT_INITIATOR
Close request connection - from initiator.
|
static byte |
CLOSEREQ_OUTPUT_PARTICIPANT
Request close connection - from participant.
|
static java.lang.String |
DATA
Send data message.
|
static byte |
DATA_INPUT_PARTICIPANT
Send data - from participant.
|
static byte |
DATA_OUTPUT_INITIATOR
Send data - from initiator.
|
static byte[] |
EMPTY_BYTE_ARRAY |
static java.lang.String |
INIT
Init a connection.
|
static byte |
INIT_INPUT_INITIATOR
Create virtual input connection - from initiator.
|
static byte |
INIT_OUTPUT_INITIATOR
Create virtual output connection - from initiator.
|
protected java.lang.Object |
message
The binary message part.
|
static byte |
MESSAGE_TYPE_STREAM
The message type for streams.
|
static java.util.Map<jadex.commons.Tuple,java.lang.Byte> |
MESSAGETYPES
String type, boolean input, boolean initiator.
|
protected java.lang.Integer |
seqnumber
The sequence number.
|
protected int |
streamid
The stream id.
|
protected byte |
type
The type of message (init, data, close).
|
acquired, codecids, codecs, data, encodingcontext, future, interest, nonfunc, prolog, receivers, transports, waiting
Constructor and Description |
---|
StreamSendTask(byte type,
java.lang.Object message,
int streamid,
jadex.bridge.ITransportComponentIdentifier[] receivers,
ITransport[] transports,
jadex.bridge.service.types.message.ICodec[] codecs,
java.lang.Integer seqnumber,
java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Create a new manager send task.
|
StreamSendTask(StreamSendTask task)
Create a shallow copy.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
fetchData()
Get the encoded message.
|
protected byte[] |
fetchProlog()
Get the prolog bytes.
|
java.lang.Object |
getMessage()
Get the message.
|
jadex.bridge.service.types.message.MessageType |
getMessageType()
Get the messagetype.
|
static byte |
getMessageType(java.lang.String type,
boolean input,
boolean initiator)
Get the message type.
|
static long |
getMinLeaseTime(jadex.bridge.IComponentIdentifier platform)
Get the minimum lease time.
|
java.lang.Integer |
getSequenceNumber()
Get the sequence number.
|
done, doSendMessage, encode, getData, getFuture, getNonFunctionalProperties, getProlog, getReceivers, getTransports, ready
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getData, getNonFunctionalProperties, getProlog, getReceivers, ready
public static final byte MESSAGE_TYPE_STREAM
public static final java.lang.String INIT
public static final java.lang.String ACKINIT
public static final java.lang.String DATA
public static final java.lang.String ACKDATA
public static final java.lang.String CLOSE
public static final java.lang.String ACKCLOSE
public static final java.lang.String CLOSEREQ
public static final java.lang.String ACKCLOSEREQ
public static final java.lang.String ALIVE
public static final byte INIT_OUTPUT_INITIATOR
public static final byte ACKINIT_OUTPUT_PARTICIPANT
public static final byte DATA_OUTPUT_INITIATOR
public static final byte ACKDATA_OUTPUT_PARTICIPANT
public static final byte CLOSEREQ_OUTPUT_PARTICIPANT
public static final byte ACKCLOSEREQ_OUTPUT_INITIATOR
public static final byte CLOSE_OUTPUT_INITIATOR
public static final byte ACKCLOSE_OUTPUT_PARTICIPANT
public static final byte INIT_INPUT_INITIATOR
public static final byte ACKINIT_INPUT_PARTICIPANT
public static final byte DATA_INPUT_PARTICIPANT
public static final byte ACKDATA_INPUT_INITIATOR
public static final byte CLOSEREQ_INPUT_INITIATOR
public static final byte ACKCLOSEREQ_INPUT_PARTICIPANT
public static final byte CLOSE_INPUT_PARTICIPANT
public static final byte ACKCLOSE_INPUT_INITIATOR
public static final byte ALIVE_INITIATOR
public static final byte ALIVE_PARTICIPANT
public static final java.util.Map<jadex.commons.Tuple,java.lang.Byte> MESSAGETYPES
public static final byte[] EMPTY_BYTE_ARRAY
protected java.lang.Object message
protected int streamid
protected byte type
protected java.lang.Integer seqnumber
public StreamSendTask(byte type, java.lang.Object message, int streamid, jadex.bridge.ITransportComponentIdentifier[] receivers, ITransport[] transports, jadex.bridge.service.types.message.ICodec[] codecs, java.lang.Integer seqnumber, java.util.Map<java.lang.String,java.lang.Object> nonfunc)
public StreamSendTask(StreamSendTask task)
public java.lang.Object getMessage()
getMessage
in interface ISendTask
getMessage
in class AbstractSendTask
public jadex.bridge.service.types.message.MessageType getMessageType()
getMessageType
in class AbstractSendTask
public java.lang.Integer getSequenceNumber()
protected byte[] fetchData()
fetchData
in class AbstractSendTask
protected byte[] fetchProlog()
fetchProlog
in class AbstractSendTask
public static byte getMessageType(java.lang.String type, boolean input, boolean initiator)
type
- The type.input
- Flag if in input connection.initiator
- Flag if is initiator side.public static long getMinLeaseTime(jadex.bridge.IComponentIdentifier platform)
platform
- The (local) platform.