Package org.oddjob.monitor.context
Interface AncestorContext
- All Known Subinterfaces:
ExplorerContext,ServerContext
- All Known Implementing Classes:
ExplorerContextImpl,ServerContextImpl,ServerContextMain
public interface AncestorContext
A General purpose context with an Ancestor. Something that provides information (a context) to things like
a monitor.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> Optional<T> findAncestorOfType(Class<T> type) Find a component of a certain type in the hierarchy.Get the parent context of this context.Get the component this is the context for.
-
Method Details
-
getThisComponent
Object getThisComponent()Get the component this is the context for.- Returns:
-
getParent
AncestorContext getParent()Get the parent context of this context.- Returns:
- The parent, or null if this is the root.
-
findAncestorOfType
Find a component of a certain type in the hierarchy.- Type Parameters:
T-- Parameters:
type-- Returns:
-