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, wait
handleMessage
public 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.Receiver
public 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.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()
ManagementChannelInitialization.ManagementChannelShutdownHandle
This method does not wait for previously submitted operations to be
completed. Use awaitCompletion
to do that.
shutdown
in interface ManagementChannelInitialization.ManagementChannelShutdownHandle
public void shutdownNow()
ManagementChannelInitialization.ManagementChannelShutdownHandle
shutdownNow
in interface ManagementChannelInitialization.ManagementChannelShutdownHandle
public boolean awaitCompletion(long timeout, TimeUnit unit) throws InterruptedException
ManagementChannelInitialization.ManagementChannelShutdownHandle
awaitCompletion
in interface ManagementChannelInitialization.ManagementChannelShutdownHandle
timeout
- the timeoutunit
- the time unitfalse
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 © 2023 JBoss by Red Hat. All rights reserved.