Package org.jboss.as.protocol.mgmt
Class ManagementResponseHeader
java.lang.Object
org.jboss.as.protocol.mgmt.ManagementProtocolHeader
org.jboss.as.protocol.mgmt.ManagementResponseHeader
ManagementProtocol header used for management operation responses. Provides the default header fields from
ManagementProtocolHeader.- Author:
- John Bailey, Kabir Khan
-
Constructor Summary
ConstructorsConstructorDescriptionManagementResponseHeader(int version, int responseId, String error) Construct an instance with the protocol version for the header. -
Method Summary
Modifier and TypeMethodDescriptionstatic ManagementResponseHeadercreate(ManagementProtocolHeader header) static ManagementResponseHeadercreate(ManagementProtocolHeader header, int responseId) static ManagementResponseHeadercreate(ManagementRequestHeader header) static ManagementResponseHeadercreate(ManagementRequestHeader header, Throwable error) getError()Gets any error that happened on the server trying to initialize the requestintThe response id.bytegetType()The typebooleanisFailed()Whether this is an error response.voidvoidwrite(DataOutput output) Write the header information to the providedDataOutput.Methods inherited from class org.jboss.as.protocol.mgmt.ManagementProtocolHeader
cast, getVersion, parse, validateSignature
-
Constructor Details
-
ManagementResponseHeader
Construct an instance with the protocol version for the header.- Parameters:
version- The protocol versionresponseId- The response iderror- an optional error description
-
-
Method Details
-
read
- Throws:
IOException
-
write
Description copied from class:ManagementProtocolHeaderWrite the header information to the providedDataOutput.- Overrides:
writein classManagementProtocolHeader- Parameters:
output- The output to write to- Throws:
IOException- If any problems occur writing to the output
-
isFailed
public boolean isFailed()Whether this is an error response.- Returns:
trueif the request failed,falseotherwise
-
getResponseId
public int getResponseId()The response id. This should correspond to the id of the request.- Returns:
- The responseId
-
getError
Gets any error that happened on the server trying to initialize the request- Returns:
- the error
-
getType
public byte getType()Description copied from class:ManagementProtocolHeaderThe type- Specified by:
getTypein classManagementProtocolHeader- Returns:
- the protocol byte identifying the type
-
create
-
create
-
create
-
create
-