Package org.jboss.as.protocol.mgmt
Class ProtocolUtils
- java.lang.Object
-
- org.jboss.as.protocol.mgmt.ProtocolUtils
-
public final class ProtocolUtils extends Object
Utility class providing methods for common management tasks.- Author:
- John Bailey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceProtocolUtils.ResponseWriter
-
Constructor Summary
Constructors Constructor Description ProtocolUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A> ManagementRequestContext.AsyncTask<A>emptyResponseTask()static voidexpectHeader(byte actual, int expected)static voidexpectHeader(DataInput input, int expected)static voidexpectHeader(InputStream input, int expected)static bytereadByte(InputStream stream)static intreadInt(InputStream in)static FlushableDataOutputwrapAsDataOutput(OutputStream os)static voidwriteInt(OutputStream out, int v)static <A> voidwriteResponse(ProtocolUtils.ResponseWriter writer, ManagementRequestContext<A> context)static <A> voidwriteResponse(ProtocolUtils.ResponseWriter writer, ManagementRequestContext<A> context, ManagementResponseHeader header)
-
-
-
Method Detail
-
wrapAsDataOutput
public static FlushableDataOutput wrapAsDataOutput(OutputStream os)
-
emptyResponseTask
public static <A> ManagementRequestContext.AsyncTask<A> emptyResponseTask()
-
writeResponse
public static <A> void writeResponse(ProtocolUtils.ResponseWriter writer, ManagementRequestContext<A> context) throws IOException
- Throws:
IOException
-
writeResponse
public static <A> void writeResponse(ProtocolUtils.ResponseWriter writer, ManagementRequestContext<A> context, ManagementResponseHeader header) throws IOException
- Throws:
IOException
-
expectHeader
public static void expectHeader(InputStream input, int expected) throws IOException
- Throws:
IOException
-
expectHeader
public static void expectHeader(DataInput input, int expected) throws IOException
- Throws:
IOException
-
expectHeader
public static void expectHeader(byte actual, int expected) throws IOException- Throws:
IOException
-
readInt
public static int readInt(InputStream in) throws IOException
- Throws:
IOException
-
writeInt
public static void writeInt(OutputStream out, int v) throws IOException
- Throws:
IOException
-
readByte
public static byte readByte(InputStream stream) throws IOException
- Throws:
IOException
-
-