Top Description Inners Fields Constructors Methods
io.undertow.server

public Class JvmRouteHandler

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
java.util.Collections, .HashMap, .Map, .Set, io.undertow.server.handlers.Cookie, io.undertow.server.handlers.builder.HandlerBuilder, io.undertow.util.ConduitFactory, org.xnio.conduits.StreamSinkConduit

Handler that appends the JVM route to the session id.
Authors
Stuart Douglas, Richard Opalka

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private class
private static class

Field Summary

Modifier and TypeField and Description
private final String
private final HttpHandler
private final String
private final JvmRouteHandler.JvmRouteWrapper

Constructor Summary

AccessConstructor and Description
public
JvmRouteHandler(HttpHandler next, String sessionCookieName, String jvmRoute)

Method Summary

Modifier and TypeMethod and Description
public void
handleRequest(HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jvmRouteback to summary
private final String jvmRoute
nextback to summary
private final HttpHandler next
sessionCookieNameback to summary
private final String sessionCookieName
wrapperback to summary
private final JvmRouteHandler.JvmRouteWrapper wrapper

Constructor Detail

JvmRouteHandlerback to summary
public JvmRouteHandler(HttpHandler next, String sessionCookieName, String jvmRoute)

Method Detail

handleRequestback to summary
public void handleRequest(HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

Annotations
@Override
io.undertow.server back to summary

public Class JvmRouteHandler.Builder

extends Object
implements HandlerBuilder
Class Inheritance
All Implemented Interfaces
io.undertow.server.handlers.builder.HandlerBuilder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HandlerWrapper
build(Map<String, Object>
The handler config
config
)

Implements io.undertow.server.handlers.builder.HandlerBuilder.build.

Creates the handler

public String
public String
name()

Implements io.undertow.server.handlers.builder.HandlerBuilder.name.

The string representation of the handler name.

public Map<String, Class<?>>
parameters()

Implements io.undertow.server.handlers.builder.HandlerBuilder.parameters.

Returns a map of parameters and their types.

public Set<String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Builderback to summary
public Builder()

Method Detail

buildback to summary
public HandlerWrapper build(Map<String, Object> config)

Implements io.undertow.server.handlers.builder.HandlerBuilder.build.

Doc from io.undertow.server.handlers.builder.HandlerBuilder.build.

Creates the handler

Parameters
config:Map<String, Object>

The handler config

Returns:HandlerWrapper

The new predicate

Annotations
@Override
defaultParameterback to summary
public String defaultParameter()

Implements io.undertow.server.handlers.builder.HandlerBuilder.defaultParameter.

Returns:String

Doc from io.undertow.server.handlers.builder.HandlerBuilder.defaultParameter.

The default parameter name, or null if it does not have a default parameter

Annotations
@Override
nameback to summary
public String name()

Implements io.undertow.server.handlers.builder.HandlerBuilder.name.

Doc from io.undertow.server.handlers.builder.HandlerBuilder.name.

The string representation of the handler name.

Returns:String

The handler name

Annotations
@Override
parametersback to summary
public Map<String, Class<?>> parameters()

Implements io.undertow.server.handlers.builder.HandlerBuilder.parameters.

Doc from io.undertow.server.handlers.builder.HandlerBuilder.parameters.

Returns a map of parameters and their types.

Annotations
@Override
requiredParametersback to summary
public Set<String> requiredParameters()

Implements io.undertow.server.handlers.builder.HandlerBuilder.requiredParameters.

Returns:Set<String>

Doc from io.undertow.server.handlers.builder.HandlerBuilder.requiredParameters.

The required parameters

Annotations
@Override
io.undertow.server back to summary

private Class JvmRouteHandler.JvmRouteWrapper

extends Object
implements ConduitWrapper<StreamSinkConduit>
Class Inheritance
All Implemented Interfaces
io.undertow.server.ConduitWrapper

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public StreamSinkConduit
wrap(ConduitFactory<StreamSinkConduit>
the original conduit
factory
,
HttpServerExchange
the in-flight HTTP exchange
exchange
)

Implements io.undertow.server.ConduitWrapper.wrap.

Wrap the conduit.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JvmRouteWrapperback to summary
private JvmRouteWrapper()

Method Detail

wrapback to summary
public StreamSinkConduit wrap(ConduitFactory<StreamSinkConduit> factory, HttpServerExchange exchange)

Implements io.undertow.server.ConduitWrapper.wrap.

Doc from io.undertow.server.ConduitWrapper.wrap.

Wrap the conduit. The wrapper should not return null. If no wrapping is desired, the original conduit should be returned.

Parameters
factory:ConduitFactory<StreamSinkConduit>

the original conduit

exchange:HttpServerExchange

the in-flight HTTP exchange

Returns:StreamSinkConduit

the replacement conduit

Annotations
@Override
io.undertow.server back to summary

private Class JvmRouteHandler.Wrapper

extends Object
implements HandlerWrapper
Class Inheritance
All Implemented Interfaces
io.undertow.server.HandlerWrapper

Field Summary

Modifier and TypeField and Description
private final String
private final String

Constructor Summary

AccessConstructor and Description
private
Wrapper(String value, String sessionCookieName)

Method Summary

Modifier and TypeMethod and Description
public HttpHandler
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sessionCookieNameback to summary
private final String sessionCookieName
valueback to summary
private final String value

Constructor Detail

Wrapperback to summary
private Wrapper(String value, String sessionCookieName)

Method Detail

wrapback to summary
public HttpHandler wrap(HttpHandler handler)

Implements io.undertow.server.HandlerWrapper.wrap.

Annotations
@Override