Class SpinnakerRequest
java.lang.Object
uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
- All Implemented Interfaces:
SerializableMessage
- Direct Known Subclasses:
SCPRequest
,SDPMessage
public abstract class SpinnakerRequest extends Object implements SerializableMessage
Base class for sendable SDP-based messages. SDP-based messages are those
messages that have an SDP header.
- Author:
- Donal Fellows
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
SpinnakerRequest(SDPHeader sdpHeader)
-
Method Summary
Modifier and Type Method Description ByteBuffer
getMessageData(HasChipLocation originatingChip)
Get a buffer holding the actual bytes of the message, ready to send.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.manchester.spinnaker.messages.SerializableMessage
addToBuffer
-
Field Details
-
sdpHeader
The SDP header of the message.
-
-
Constructor Details
-
SpinnakerRequest
- Parameters:
sdpHeader
- The SDP header of the message.
-
-
Method Details
-
getMessageData
Get a buffer holding the actual bytes of the message, ready to send. This also prepares this message to be actually sent, which involves setting the tag and source of the header to special marker values. This can only be called once per connection!- Parameters:
originatingChip
- Where the message notionally originates from.- Returns:
- The byte buffer.
- Throws:
IllegalStateException
- If a message is prepared for sending a second time.
-