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 -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleFailed(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, waitMethods inherited from interface org.jboss.as.protocol.mgmt.ManagementRequest
getOperationTypeMethods inherited from interface org.jboss.as.protocol.mgmt.ManagementRequestHandler
handleRequest
-
Constructor Details
-
AbstractManagementRequest
public AbstractManagementRequest()
-
-
Method Details
-
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
-