public interface Asset
extends net.openhft.chronicle.core.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
Asset |
acquireAsset(RequestContext context,
String fullName) |
<V> V |
acquireView(Class<V> viewType,
RequestContext rc) |
default <V> V |
acquireView(RequestContext rc) |
<L> void |
addLeafRule(Class<L> iClass,
String description,
LeafViewFactory<L> factory) |
<V> V |
addView(Class<V> viewType,
V v) |
<W,U> void |
addWrappingRule(Class<W> iClass,
String description,
java.util.function.BiPredicate<RequestContext,Asset> predicate,
WrappingViewFactory<W,U> factory,
Class<U> underlyingType) |
<W,U> void |
addWrappingRule(Class<W> iClass,
String description,
WrappingViewFactory<W,U> factory,
Class<U> underlyingType) |
<I> I |
createLeafView(Class viewType,
RequestContext rc,
Asset asset) |
<I,U> I |
createWrappingView(Class viewType,
RequestContext rc,
Asset asset,
U underling) |
default Asset |
findAsset(String name)
Search a tree to find the first Asset with the name given.
|
default <V> V |
findOrCreateView(Class<V> viewType) |
default <V> V |
findView(Class<V> viewType)
Search for a view up the tree.
|
void |
forEachChild(net.openhft.chronicle.core.util.ThrowingAcceptor<Asset,InvalidSubscriberException> child) |
default String |
fullName() |
default Asset |
getAsset(String fullName)
Navigate down the tree to find an asset.
|
Asset |
getChild(String name) |
<V> V |
getView(Class<V> vClass) |
boolean |
hasChildren() |
<V> boolean |
hasFactoryFor(Class<V> viewType) |
boolean |
isReadOnly() |
boolean |
isSubAsset() |
String |
name() |
Asset |
parent() |
<I> void |
registerView(Class<I> iClass,
I interceptor) |
void |
removeChild(String name) |
default Asset |
root() |
Subscription |
subscription(boolean createIfAbsent) |
String name()
Subscription subscription(boolean createIfAbsent) throws AssetNotFoundException
AssetNotFoundException@NotNull default String fullName()
@Nullable Asset parent()
@NotNull Asset acquireAsset(RequestContext context, String fullName) throws AssetNotFoundException
AssetNotFoundException@Nullable default Asset getAsset(@NotNull String fullName)
fullName - with names seperated by /default Asset findAsset(@NotNull String name)
name - partial name of asset to find.default <V> V findView(@NotNull
Class<V> viewType)
viewType - the class pf the viewdefault <V> V findOrCreateView(@NotNull
Class<V> viewType)
<V> boolean hasFactoryFor(Class<V> viewType)
void removeChild(String name)
boolean isReadOnly()
@NotNull
default <V> V acquireView(@NotNull
RequestContext rc)
throws AssetNotFoundException
AssetNotFoundException<V> V acquireView(Class<V> viewType, RequestContext rc) throws AssetNotFoundException
AssetNotFoundException<V> V getView(Class<V> vClass)
<I> void registerView(Class<I> iClass, I interceptor)
<W,U> void addWrappingRule(Class<W> iClass, String description, java.util.function.BiPredicate<RequestContext,Asset> predicate, WrappingViewFactory<W,U> factory, Class<U> underlyingType)
<W,U> void addWrappingRule(Class<W> iClass, String description, WrappingViewFactory<W,U> factory, Class<U> underlyingType)
<L> void addLeafRule(Class<L> iClass, String description, LeafViewFactory<L> factory)
<I,U> I createWrappingView(Class viewType, RequestContext rc, Asset asset, U underling) throws AssetNotFoundException
AssetNotFoundException<I> I createLeafView(Class viewType, RequestContext rc, Asset asset) throws AssetNotFoundException
AssetNotFoundException<V> V addView(Class<V> viewType, V v)
boolean isSubAsset()
@NotNull default Asset root()
boolean hasChildren()
void forEachChild(net.openhft.chronicle.core.util.ThrowingAcceptor<Asset,InvalidSubscriberException> child) throws InvalidSubscriberException
InvalidSubscriberExceptionCopyright © 2015. All rights reserved.