Top Description Inners Fields Constructors Methods
io.undertow.server.handlers.proxy.mod_cluster

public Class VirtualHost

extends Object
Class Inheritance
Imports
java.util.Collection, .Collections, .Comparator, .Set, .TreeSet, java.util.concurrent.ConcurrentMap, io.undertow.UndertowMessages, io.undertow.util.CopyOnWriteMap, .PathMatcher, .URLUtils

The virtual host handler.
Author
Emanuel Muckenhuber

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final ConcurrentMap<String, VirtualHost.HostEntry>
private final VirtualHost.HostEntry
private volatile int[]
lengths

lengths of all registered contexts

private static final String

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private void
pack-priv boolean
pack-priv PathMatcher.PathMatch<VirtualHost.HostEntry>

Returns:

The match match. This will never be null, however if none matched its value field will be
match
(String
The relative path to match
path
)

Matches a path against the registered handlers.

public synchronized void
registerContext(final String path, final String jvmRoute, final Context context)

public synchronized void
removeContext(final String path, final String jvmRoute, final Context context)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextsback to summary
private final ConcurrentMap<String, VirtualHost.HostEntry> contexts
defaultHandlerback to summary
private final VirtualHost.HostEntry defaultHandler
lengthsback to summary
private volatile int[] lengths

lengths of all registered contexts

STRING_PATH_SEPARATORback to summary
private static final String STRING_PATH_SEPARATOR

Constructor Detail

VirtualHostback to summary
protected VirtualHost()

Method Detail

buildLengthsback to summary
private void buildLengths()
isEmptyback to summary
pack-priv boolean isEmpty()
matchback to summary
pack-priv PathMatcher.PathMatch<VirtualHost.HostEntry> match(String path)

Matches a path against the registered handlers.

Parameters
path:String

The relative path to match

Returns:PathMatcher.PathMatch<VirtualHost.HostEntry>

The match match. This will never be null, however if none matched its value field will be

registerContextback to summary
public synchronized void registerContext(final String path, final String jvmRoute, final Context context)
removeContextback to summary
public synchronized void removeContext(final String path, final String jvmRoute, final Context context)
io.undertow.server.handlers.proxy.mod_cluster back to summary

pack-priv Class VirtualHost.HostEntry

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.server.handlers.proxy.mod_cluster.VirtualHost.HostEntry

Field Summary

Modifier and TypeField and Description
private final String
private final ConcurrentMap<String, Context>

Constructor Summary

AccessConstructor and Description
pack-priv
HostEntry(String contextPath)

Method Summary

Modifier and TypeMethod and Description
protected Context
getContextForNode(final String
the jvm route
jvmRoute
)

Get a context for a jvmRoute.

protected String
protected Collection<Context>
getContexts()

Get all registered contexts.

protected Collection<String>
getNodes()

Get list of nodes as jvmRoutes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextPathback to summary
private final String contextPath
contextsback to summary
private final ConcurrentMap<String, Context> contexts

Constructor Detail

HostEntryback to summary
pack-priv HostEntry(String contextPath)

Method Detail

getContextForNodeback to summary
protected Context getContextForNode(final String jvmRoute)

Get a context for a jvmRoute.

Parameters
jvmRoute:String

the jvm route

getContextPathback to summary
protected String getContextPath()
getContextsback to summary
protected Collection<Context> getContexts()

Get all registered contexts.

getNodesback to summary
protected Collection<String> getNodes()

Get list of nodes as jvmRoutes.