public class ShutdownNotifierComponent extends Object implements ShutdownNotifier
ShutdownListeners and remembers the reason for a shutdown. Both
Channels and Connections have shutdown listeners.| Constructor and Description |
|---|
ShutdownNotifierComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownListener(ShutdownListener listener)
Add shutdown listener.
|
ShutdownSignalException |
getCloseReason()
Get the shutdown reason object
|
boolean |
isOpen()
Determine whether the component is currently open.
|
void |
notifyListeners()
Protected API - notify the listeners attached to the component
|
void |
removeShutdownListener(ShutdownListener listener)
Remove shutdown listener for the component.
|
boolean |
setShutdownCauseIfOpen(ShutdownSignalException sse)
Internal: this is the means of registering shutdown.
|
public void addShutdownListener(ShutdownListener listener)
ShutdownNotifieraddShutdownListener in interface ShutdownNotifierlistener - ShutdownListener to the componentpublic ShutdownSignalException getCloseReason()
ShutdownNotifiergetCloseReason in interface ShutdownNotifierpublic void notifyListeners()
ShutdownNotifiernotifyListeners in interface ShutdownNotifierShutdownListenerpublic void removeShutdownListener(ShutdownListener listener)
ShutdownNotifierremoveShutdownListener in interface ShutdownNotifierlistener - ShutdownListener to be removedpublic boolean isOpen()
ShutdownNotifierisOpen in interface ShutdownNotifierpublic boolean setShutdownCauseIfOpen(ShutdownSignalException sse)
sse - the reason for the shutdowntrue if the component is open; false otherwise.Copyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.