Package org.jboss.as.protocol.mgmt
Class ManagementResponseHeader
- java.lang.Object
-
- org.jboss.as.protocol.mgmt.ManagementProtocolHeader
-
- org.jboss.as.protocol.mgmt.ManagementResponseHeader
-
public class ManagementResponseHeader extends ManagementProtocolHeader
ManagementProtocol header used for management operation responses. Provides the default header fields fromManagementProtocolHeader.- Author:
- John Bailey, Kabir Khan
-
-
Constructor Summary
Constructors Constructor Description ManagementResponseHeader(int version, int responseId, String error)Construct an instance with the protocol version for the header.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ManagementResponseHeadercreate(ManagementProtocolHeader header)static ManagementResponseHeadercreate(ManagementProtocolHeader header, int responseId)static ManagementResponseHeadercreate(ManagementRequestHeader header)static ManagementResponseHeadercreate(ManagementRequestHeader header, Throwable error)StringgetError()Gets any error that happened on the server trying to initialize the requestintgetResponseId()The response id.bytegetType()The typebooleanisFailed()Whether this is an error response.voidread(DataInput input)voidwrite(DataOutput output)Write the header information to the providedDataOutput.-
Methods inherited from class org.jboss.as.protocol.mgmt.ManagementProtocolHeader
cast, getVersion, parse, validateSignature
-
-
-
-
Constructor Detail
-
ManagementResponseHeader
public ManagementResponseHeader(int version, int responseId, String error)Construct an instance with the protocol version for the header.- Parameters:
version- The protocol versionresponseId- The response iderror- an optional error description
-
-
Method Detail
-
read
public void read(DataInput input) throws IOException
- Throws:
IOException
-
write
public void write(DataOutput output) throws IOException
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
public String 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
public static ManagementResponseHeader create(ManagementProtocolHeader header)
-
create
public static ManagementResponseHeader create(ManagementRequestHeader header)
-
create
public static ManagementResponseHeader create(ManagementRequestHeader header, Throwable error)
-
create
public static ManagementResponseHeader create(ManagementProtocolHeader header, int responseId)
-
-