Package org.jboss.as.protocol.mgmt
Class ManagementProtocolHeader
java.lang.Object
org.jboss.as.protocol.mgmt.ManagementProtocolHeader
- Direct Known Subclasses:
ManagementByeByeHeader,ManagementPingHeader,ManagementPongHeader,ManagementRequestHeader,ManagementResponseHeader
ManagementProtocol header used to send the required information to establish a request with a remote controller. The primary
pieces of the request are the protocol signature and the protocol version being used.
- Author:
- John Bailey, Kabir Khan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedManagementProtocolHeader(int version) Construct an instance with the protocol version for the header. -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends ManagementProtocolHeader>
Tabstract bytegetType()The typeintThe protocol version for the current communication.static ManagementProtocolHeaderParses the input stream to read the headerprotected static voidvalidateSignature(DataInput input) Validate the header signature.voidwrite(DataOutput output) Write the header information to the providedDataOutput.
-
Constructor Details
-
ManagementProtocolHeader
protected ManagementProtocolHeader(int version) Construct an instance with the protocol version for the header.- Parameters:
version- The protocol version
-
-
Method Details
-
write
Write the header information to the providedDataOutput.- Parameters:
output- The output to write to- Throws:
IOException- If any problems occur writing to the output
-
getVersion
public int getVersion()The protocol version for the current communication.- Returns:
- The protocol version
-
getType
public abstract byte getType()The type- Returns:
- the protocol byte identifying the type
-
validateSignature
Validate the header signature.- Parameters:
input- The input to read the signature from- Throws:
IOException- If any read problems occur
-
cast
-
parse
Parses the input stream to read the header- Parameters:
input- data input to read from- Returns:
- the parsed protocol header
- Throws:
IOException
-