public abstract class AbstractKnotProxy extends Object implements KnotProxy
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_TRANSITION |
| Constructor and Description |
|---|
AbstractKnotProxy() |
| Modifier and Type | Method and Description |
|---|---|
void |
process(KnotContext knotContext,
io.vertx.core.Handler<io.vertx.core.AsyncResult<KnotContext>> result) |
protected abstract KnotContext |
processError(KnotContext knotContext,
Throwable error)
Handles any Exception thrown during processing, and is responsible for preparing the proper
KnotContext on such occasions, these will simply finish processing flows, as any error
generated by a Knot will be immediately returned to the page visitor. |
protected abstract io.reactivex.Single<KnotContext> |
processRequest(KnotContext knotContext)
Consumes a
KnotContext messages from the Server and returns modified, processed
context. |
protected boolean |
shouldProcess(Fragment fragment)
Method lets you decide whether the Fragment should be processed by your Knot or not.
|
protected abstract boolean |
shouldProcess(Set<String> knots)
Method lets you decide whether the Fragment with a given set of Knots should be processed by your Knot or not
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateProxy, createProxyWithOptionsprotected static final String DEFAULT_TRANSITION
public void process(KnotContext knotContext, io.vertx.core.Handler<io.vertx.core.AsyncResult<KnotContext>> result)
protected abstract io.reactivex.Single<KnotContext> processRequest(KnotContext knotContext)
KnotContext messages from the Server and returns modified, processed
context. Basically this method is responsible for the whole business logic that your Knot will
be performing.knotContext - message from the Server with processing context.Single that emits a processed and modified KnotContext.protected boolean shouldProcess(Fragment fragment)
protected abstract boolean shouldProcess(Set<String> knots)
knots - set of all Knots names that occurred in the current KnotContext.KnotContext.protected abstract KnotContext processError(KnotContext knotContext, Throwable error)
KnotContext on such occasions, these will simply finish processing flows, as any error
generated by a Knot will be immediately returned to the page visitor.knotContext - current context.error - the error that just occurred.Copyright © 2016–2020. All rights reserved.