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 org.jboss.remoting3.Channel.Receiver |
createDelegating(ManagementMessageHandler handler)
Create a
ManagementChannelReceiver which is delegating protocol messages to
a ManagementMessageHandler . |
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, wait
handleMessage
public static org.jboss.remoting3.Channel.Receiver 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.Receiver
protected org.jboss.remoting3.Channel.Receiver next()
public void handleError(org.jboss.remoting3.Channel channel, IOException error)
handleError
in interface org.jboss.remoting3.Channel.Receiver
public void handleEnd(org.jboss.remoting3.Channel channel)
handleEnd
in interface org.jboss.remoting3.Channel.Receiver
protected void handleChannelReset(org.jboss.remoting3.Channel channel)
channel
- the channel the bye-bye message was receivedpublic void shutdown()
ManagementMessageHandler
shutdown
in interface ManagementMessageHandler
public void shutdownNow()
ManagementMessageHandler
shutdownNow
in interface ManagementMessageHandler
public boolean awaitCompletion(long timeout, TimeUnit unit) throws InterruptedException
ManagementMessageHandler
awaitCompletion
in interface ManagementMessageHandler
timeout
- the timeoutunit
- the time unit
false if the timeout was reached and there were still active operationsInterruptedException
protected 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 streamIOException
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.