public class Route
extends ApplicationCallPipeline
Describes a node in a routing tree
ApplicationCallPipeline.ApplicationPhase
ApplicationPhase
Constructor and Description |
---|
Route(Route parent,
RouteSelector selector)
Describes a node in a routing tree
|
Modifier and Type | Method and Description |
---|---|
Route |
createChild(RouteSelector selector)
Creates a child node in this node with a given selector or returns an existing one with the same selector
|
java.util.List<io.ktor.routing.Route> |
getChildren()
List of child routes for this node
|
Route |
getParent() |
RouteSelector |
getSelector() |
void |
handle(kotlin.jvm.functions.Function3<? super io.ktor.pipeline.PipelineContext<kotlin.Unit,? extends io.ktor.application.ApplicationCall>,? super kotlin.Unit,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> handler)
Installs a handler into this route which will be called when the route is selected for a call
|
void |
intercept(io.ktor.pipeline.PipelinePhase phase,
kotlin.jvm.functions.Function3<? super io.ktor.pipeline.PipelineContext<kotlin.Unit,? extends io.ktor.application.ApplicationCall>,? super kotlin.Unit,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> block)
Installs an interceptor into this route which will be called when this or a child route is selected for a call
|
void |
invoke(kotlin.jvm.functions.Function1<? super io.ktor.routing.Route,kotlin.Unit> body)
Allows using route instance for building additional routes
|
java.lang.String |
toString() |
getReceivePipeline, getSendPipeline
public Route(Route parent, RouteSelector selector)
Describes a node in a routing tree
parent
- is a parent node in the tree, or null for root nodeselector
- is an instance of class RouteSelector
for this nodepublic java.util.List<io.ktor.routing.Route> getChildren()
List of child routes for this node
public Route createChild(RouteSelector selector)
Creates a child node in this node with a given selector or returns an existing one with the same selector
public void invoke(kotlin.jvm.functions.Function1<? super io.ktor.routing.Route,kotlin.Unit> body)
Allows using route instance for building additional routes
public void handle(kotlin.jvm.functions.Function3<? super io.ktor.pipeline.PipelineContext<kotlin.Unit,? extends io.ktor.application.ApplicationCall>,? super kotlin.Unit,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> handler)
Installs a handler into this route which will be called when the route is selected for a call
public void intercept(io.ktor.pipeline.PipelinePhase phase, kotlin.jvm.functions.Function3<? super io.ktor.pipeline.PipelineContext<kotlin.Unit,? extends io.ktor.application.ApplicationCall>,? super kotlin.Unit,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> block)
Installs an interceptor into this route which will be called when this or a child route is selected for a call
public java.lang.String toString()
public Route getParent()
public RouteSelector getSelector()