public abstract class ManagementChannelReceiver extends Object implements ManagementMessageHandler, org.jboss.remoting3.Channel.Receiver
| Constructor and Description |
|---|
ManagementChannelReceiver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitCompletion(long timeout,
TimeUnit unit)
Await the completion of all currently active operations.
|
static ManagementChannelReceiver |
createDelegating(ManagementMessageHandler handler)
Create a
ManagementChannelReceiver which is delegating protocol messages to
a ManagementMessageHandler. |
long |
getLastMessageTime() |
protected void |
handleChannelReset(org.jboss.remoting3.Channel channel)
Handle the legacy bye-bye notification.
|
void |
handleEnd(org.jboss.remoting3.Channel channel) |
void |
handleError(org.jboss.remoting3.Channel channel,
IOException error) |
void |
handleMessage(org.jboss.remoting3.Channel channel,
org.jboss.remoting3.MessageInputStream message) |
protected static void |
handlePing(org.jboss.remoting3.Channel channel,
ManagementProtocolHeader header)
Handle a simple ping request.
|
protected org.jboss.remoting3.Channel.Receiver |
next()
Get the next receiver.
|
void |
shutdown()
Don't allow new operations, but still allow requests for existing ones.
|
void |
shutdownNow()
This will attempt to cancel all active operations, without waiting for their completion.
|
protected static void |
writeHeader(ManagementProtocolHeader header,
OutputStream os)
Write the management protocol header.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleMessagepublic static ManagementChannelReceiver createDelegating(ManagementMessageHandler handler)
ManagementChannelReceiver which is delegating protocol messages to
a ManagementMessageHandler.handler - the handlerpublic void handleMessage(org.jboss.remoting3.Channel channel,
org.jboss.remoting3.MessageInputStream message)
handleMessage in interface org.jboss.remoting3.Channel.Receiverpublic long getLastMessageTime()
protected org.jboss.remoting3.Channel.Receiver next()
public void handleError(org.jboss.remoting3.Channel channel,
IOException error)
handleError in interface org.jboss.remoting3.Channel.Receiverpublic void handleEnd(org.jboss.remoting3.Channel channel)
handleEnd in interface org.jboss.remoting3.Channel.Receiverprotected void handleChannelReset(org.jboss.remoting3.Channel channel)
channel - the channel the bye-bye message was receivedpublic void shutdown()
ManagementChannelInitialization.ManagementChannelShutdownHandleThis method does not wait for previously submitted operations to be
completed. Use awaitCompletion to do that.
shutdown in interface ManagementChannelInitialization.ManagementChannelShutdownHandlepublic void shutdownNow()
ManagementChannelInitialization.ManagementChannelShutdownHandleshutdownNow in interface ManagementChannelInitialization.ManagementChannelShutdownHandlepublic boolean awaitCompletion(long timeout,
TimeUnit unit)
throws InterruptedException
ManagementChannelInitialization.ManagementChannelShutdownHandleawaitCompletion in interface ManagementChannelInitialization.ManagementChannelShutdownHandletimeout - the timeoutunit - the time unitfalse if the timeout was reached and there were still active operationsInterruptedExceptionprotected static void handlePing(org.jboss.remoting3.Channel channel,
ManagementProtocolHeader header)
throws IOException
channel - the channelheader - the protocol headerIOException - for any errorprotected static void writeHeader(ManagementProtocolHeader header, OutputStream os) throws IOException
header - the mgmt protocol headeros - the output streamIOExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.