public final class ManagementChannelHandler extends AbstractMessageHandler implements ManagementChannelAssociation
ManagementRequestHandlerFactory per channel.| Modifier and Type | Field and Description |
|---|---|
static org.jboss.remoting3.Attachments.Key<File> |
TEMP_DIR
Optional attachment for a temp file directory.
|
| Constructor and Description |
|---|
ManagementChannelHandler(ManagementClientChannelStrategy strategy,
ExecutorService executorService) |
ManagementChannelHandler(ManagementClientChannelStrategy strategy,
ExecutorService executorService,
ManagementRequestHandlerFactory... initial) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandlerFactory(ManagementRequestHandlerFactory factory)
Add a management request handler factory to this context.
|
<T,A> org.jboss.threads.AsyncFuture<T> |
executeRequest(ActiveOperation<T,A> support,
ManagementRequest<T,A> request)
Execute a request based on an existing active operation.
|
<T,A> org.jboss.threads.AsyncFuture<T> |
executeRequest(Integer operationId,
ManagementRequest<T,A> request)
Execute a request based on an existing active operation.
|
<T,A> ActiveOperation<T,A> |
executeRequest(ManagementRequest<T,A> request,
A attachment)
Execute a management request.
|
<T,A> ActiveOperation<T,A> |
executeRequest(ManagementRequest<T,A> request,
A attachment,
ActiveOperation.CompletedCallback<T> callback)
Execute a management request.
|
org.jboss.remoting3.Attachments |
getAttachments()
Get the attachments object that can be used to share state between users of this object.
|
org.jboss.remoting3.Channel |
getChannel()
Get the underlying remoting channel associated with this context.
|
long |
getLastMessageReceivedTime() |
org.jboss.remoting3.Channel.Receiver |
getReceiver()
Get a receiver instance for this context.
|
InetAddress |
getRemoteAddress()
Get the remote address.
|
protected ManagementRequestHandler<?,?> |
getRequestHandler(ManagementRequestHeader header)
Get the request handler.
|
<T,A> ActiveOperation<T,A> |
initializeOperation(A attachment,
ActiveOperation.CompletedCallback<T> callback)
Initialize a new
ActiveOperation, for subsequent use with ManagementChannelAssociation.executeRequest(ActiveOperation, ManagementRequest). |
boolean |
removeHandlerFactory(ManagementRequestHandlerFactory instance)
Remove a management request handler factory from this context.
|
awaitCompletion, cancelAllActiveOperations, executeRequest, getActiveOperation, getActiveOperation, getExecutor, getFallbackHandler, handleChannelClosed, handleClose, handleMessage, handleMessage, handleMessage, handleRequest, isShutdown, registerActiveOperation, registerActiveOperation, registerActiveOperation, registerActiveOperation, removeActiveOperation, safeWriteErrorResponse, shutdown, shutdownNow, validateRequest, writeErrorResponse, writeHeaderpublic static final org.jboss.remoting3.Attachments.Key<File> TEMP_DIR
public ManagementChannelHandler(ManagementClientChannelStrategy strategy, ExecutorService executorService)
public ManagementChannelHandler(ManagementClientChannelStrategy strategy, ExecutorService executorService, ManagementRequestHandlerFactory... initial)
public long getLastMessageReceivedTime()
public org.jboss.remoting3.Channel getChannel()
throws IOException
getChannel in interface ManagementChannelAssociationIOExceptionpublic InetAddress getRemoteAddress()
null if not availablepublic <T,A> ActiveOperation<T,A> initializeOperation(A attachment, ActiveOperation.CompletedCallback<T> callback) throws IOException
ManagementChannelAssociationActiveOperation, for subsequent use with ManagementChannelAssociation.executeRequest(ActiveOperation, ManagementRequest).initializeOperation in interface ManagementChannelAssociationT - the result typeA - the attachment typeattachment - the attachmentcallback - the completion listenerIOExceptionpublic <T,A> ActiveOperation<T,A> executeRequest(ManagementRequest<T,A> request, A attachment, ActiveOperation.CompletedCallback<T> callback) throws IOException
executeRequest in interface ManagementChannelAssociationT - the result typeA - the attachment typerequest - the requestattachment - the attachmentcallback - the completion listenerIOExceptionpublic <T,A> ActiveOperation<T,A> executeRequest(ManagementRequest<T,A> request, A attachment) throws IOException
executeRequest in interface ManagementChannelAssociationT - the result typeA - the attachment typerequest - the requestattachment - the attachmentIOExceptionpublic <T,A> org.jboss.threads.AsyncFuture<T> executeRequest(Integer operationId, ManagementRequest<T,A> request) throws IOException
executeRequest in interface ManagementChannelAssociationT - the request typeA - the attachment typeoperationId - the operation-id of the existing active operationrequest - the requestIOExceptionpublic <T,A> org.jboss.threads.AsyncFuture<T> executeRequest(ActiveOperation<T,A> support, ManagementRequest<T,A> request) throws IOException
executeRequest in interface ManagementChannelAssociationT - the result typeA - the attachment typesupport - the active operationrequest - the requestIOExceptionprotected ManagementRequestHandler<?,?> getRequestHandler(ManagementRequestHeader header)
getRequestHandler in class AbstractMessageHandlerheader - the request headerpublic org.jboss.remoting3.Channel.Receiver getReceiver()
public org.jboss.remoting3.Attachments getAttachments()
ManagementChannelAssociationgetAttachments in interface ManagementChannelAssociationpublic void addHandlerFactory(ManagementRequestHandlerFactory factory)
factory - the request handler to addpublic boolean removeHandlerFactory(ManagementRequestHandlerFactory instance)
instance - the request handler factorytrue if the instance was removed, false otherwiseCopyright © 2020 JBoss by Red Hat. All rights reserved.