Package org.jboss.as.protocol.mgmt
Class AbstractManagementRequest<T,A>
- java.lang.Object
-
- org.jboss.as.protocol.mgmt.AbstractManagementRequest<T,A>
-
- Type Parameters:
T- the response typeA- the attachment type
- All Implemented Interfaces:
ManagementRequest<T,A>,ManagementRequestHandler<T,A>,ManagementResponseHandler<T,A>
- Direct Known Subclasses:
ManagementPingRequest
public abstract class AbstractManagementRequest<T,A> extends Object implements ManagementRequest<T,A>
utility class for creating management requests.- Author:
- Emanuel Muckenhuber
-
-
Constructor Summary
Constructors Constructor Description AbstractManagementRequest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidhandleFailed(ManagementResponseHeader header, ActiveOperation.ResultHandler<T> resultHandler)Handle a failed response.voidsendRequest(ActiveOperation.ResultHandler<T> resultHandler, ManagementRequestContext<A> context)Send the request.protected abstract voidsendRequest(ActiveOperation.ResultHandler<T> resultHandler, ManagementRequestContext<A> context, FlushableDataOutput output)Send the request.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.as.protocol.mgmt.ManagementRequest
getOperationType
-
Methods inherited from interface org.jboss.as.protocol.mgmt.ManagementRequestHandler
handleRequest
-
-
-
-
Method Detail
-
sendRequest
protected abstract void sendRequest(ActiveOperation.ResultHandler<T> resultHandler, ManagementRequestContext<A> context, FlushableDataOutput output) throws IOException
Send the request.- Parameters:
resultHandler- the result handlercontext- the request contextoutput- the data output- Throws:
IOException
-
sendRequest
public void sendRequest(ActiveOperation.ResultHandler<T> resultHandler, ManagementRequestContext<A> context) throws IOException
Description copied from interface:ManagementRequestSend the request.- Specified by:
sendRequestin interfaceManagementRequest<T,A>- Parameters:
resultHandler- the result handlercontext- the request context- Throws:
IOException- for any error
-
handleFailed
public void handleFailed(ManagementResponseHeader header, ActiveOperation.ResultHandler<T> resultHandler)
Description copied from interface:ManagementResponseHandlerHandle a failed response.- Specified by:
handleFailedin interfaceManagementResponseHandler<T,A>- Parameters:
header- the headerresultHandler- the result handler
-
-