Class HTTPMessage
java.lang.Object
com.biglybt.core.networkmanager.impl.http.HTTPMessage
- All Implemented Interfaces:
Message
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DirectByteBuffer[]private static final Stringstatic final Stringprivate static final byte[]Fields inherited from interface Message
TYPE_DATA_PAYLOAD, TYPE_PROTOCOL_PAYLOAD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHTTPMessage(byte[] stuff) protectedHTTPMessage(String stuff) -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(DirectByteBuffer data, byte version) Create a new instance of this message by decoding the given byte serialization.voiddestroy()Destroy the message; i.e.protected RawMessagegetData()Get message payload data.Get textual description of this particular message.Get the main feature set name this message belongs to.intGet the static message sub-id for the feature.getID()Get message id.byte[]intgetType()Get message type.byte
-
Field Details
-
MSG_ID
- See Also:
-
MSG_ID_BYTES
private static final byte[] MSG_ID_BYTES -
MSG_DESC
- See Also:
-
data
-
-
Constructor Details
-
HTTPMessage
-
HTTPMessage
protected HTTPMessage(byte[] stuff)
-
-
Method Details
-
getID
-
getIDBytes
public byte[] getIDBytes()- Specified by:
getIDBytesin interfaceMessage
-
getFeatureID
Description copied from interface:MessageGet the main feature set name this message belongs to.- Specified by:
getFeatureIDin interfaceMessage- Returns:
- feature id
-
getFeatureSubID
public int getFeatureSubID()Description copied from interface:MessageGet the static message sub-id for the feature.- Specified by:
getFeatureSubIDin interfaceMessage- Returns:
- sub id
-
getType
-
getVersion
public byte getVersion()- Specified by:
getVersionin interfaceMessage
-
getDescription
Description copied from interface:MessageGet textual description of this particular message.- Specified by:
getDescriptionin interfaceMessage- Returns:
- description
-
getData
Description copied from interface:MessageGet message payload data. -
deserialize
Description copied from interface:MessageCreate a new instance of this message by decoding the given byte serialization.- Specified by:
deserializein interfaceMessage- Parameters:
data- to deserialize- Returns:
- decoded message instance
- Throws:
MessageException- if the decoding process fails NOTE: Does not auto-return given direct buffer on thrown exception.
-
encode
-
destroy
-