Top Description Inners Fields Constructors Methods
io.undertow.server

public Class ListenerRegistry

extends Object
Class Inheritance
Imports
java.net.InetSocketAddress, java.util.Collection, .Collections, .Map, .Set, java.util.concurrent.ConcurrentMap, .CopyOnWriteArraySet, io.undertow.UndertowMessages, io.undertow.util.CopyOnWriteMap

A registry of listeners, and the services that are exposed via these listeners. This is not used directly by Undertow, but can be used by embedding applications to track listener metadata.
Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
private final ConcurrentMap<String, ListenerRegistry.Listener>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public ListenerRegistry.Listener
getListener(final String name)

public void
removeListener(final String name)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listenersback to summary
private final ConcurrentMap<String, ListenerRegistry.Listener> listeners

Constructor Detail

ListenerRegistryback to summary
public ListenerRegistry()

Method Detail

addListenerback to summary
public void addListener(final ListenerRegistry.Listener listener)
getListenerback to summary
public ListenerRegistry.Listener getListener(final String name)
removeListenerback to summary
public void removeListener(final String name)
io.undertow.server back to summary

public final Class ListenerRegistry.HttpUpgradeMetadata

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Map<String, Object>
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
HttpUpgradeMetadata(final String protocol, final String subProtocol)

Method Summary

Modifier and TypeMethod and Description
public Object
public Collection<String>
public String
public String
public Object
public Object
setContextInformation(final String key, final Object value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextInformationback to summary
private final Map<String, Object> contextInformation
protocolback to summary
private final String protocol
subProtocolback to summary
private final String subProtocol

Constructor Detail

HttpUpgradeMetadataback to summary
public HttpUpgradeMetadata(final String protocol, final String subProtocol)

Method Detail

getContextInformationback to summary
public Object getContextInformation(final String key)
getContextKeysback to summary
public Collection<String> getContextKeys()
getProtocolback to summary
public String getProtocol()
getSubProtocolback to summary
public String getSubProtocol()
removeContextInformationback to summary
public Object removeContextInformation(final String key)
setContextInformationback to summary
public Object setContextInformation(final String key, final Object value)
io.undertow.server back to summary

public final Class ListenerRegistry.Listener

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final InetSocketAddress
private final Map<String, Object>
contextInformation

Map that can be used to store additional listener metadata

private final Set<ListenerRegistry.HttpUpgradeMetadata>
httpUpgradeMetadata

Information about any HTTP upgrade handlers that are registered on this handler.

private final String
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
Listener(final String protocol, final String name, final String serverName, final InetSocketAddress bindAddress)

Method Summary

Modifier and TypeMethod and Description
public void
public InetSocketAddress
getBindAddress()

The address that this listener is bound to

public Object
public Collection<String>
public Set<ListenerRegistry.HttpUpgradeMetadata>
public String
getName()

The optional listener name;

public String
getProtocol()

The protocol that this listener is using

public String
getServerName()

The server name

public Object
public void
public Object
setContextInformation(final String key, final Object value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bindAddressback to summary
private final InetSocketAddress bindAddress
contextInformationback to summary
private final Map<String, Object> contextInformation

Map that can be used to store additional listener metadata

httpUpgradeMetadataback to summary
private final Set<ListenerRegistry.HttpUpgradeMetadata> httpUpgradeMetadata

Information about any HTTP upgrade handlers that are registered on this handler.

nameback to summary
private final String name
protocolback to summary
private final String protocol
serverNameback to summary
private final String serverName

Constructor Detail

Listenerback to summary
public Listener(final String protocol, final String name, final String serverName, final InetSocketAddress bindAddress)

Method Detail

addHttpUpgradeMetadataback to summary
public void addHttpUpgradeMetadata(final ListenerRegistry.HttpUpgradeMetadata upgradeMetadata)
getBindAddressback to summary
public InetSocketAddress getBindAddress()

The address that this listener is bound to

getContextInformationback to summary
public Object getContextInformation(final String key)
getContextKeysback to summary
public Collection<String> getContextKeys()
getHttpUpgradeMetadataback to summary
public Set<ListenerRegistry.HttpUpgradeMetadata> getHttpUpgradeMetadata()
getNameback to summary
public String getName()

The optional listener name;

getProtocolback to summary
public String getProtocol()

The protocol that this listener is using

getServerNameback to summary
public String getServerName()

The server name

removeContextInformationback to summary
public Object removeContextInformation(final String key)
removeHttpUpgradeMetadataback to summary
public void removeHttpUpgradeMetadata(final ListenerRegistry.HttpUpgradeMetadata upgradeMetadata)
setContextInformationback to summary
public Object setContextInformation(final String key, final Object value)