Top Description Inners Fields Methods
org.eclipse.jetty.util.component

public Interface Environment

extends Attributes
Known Direct Implementers
org.eclipse.jetty.util.component.Environment.Named
Imports
java.io.IOException, java.util.Collection, .Collections, .Map, .TreeMap, org.eclipse.jetty.util.Attributes, .TypeUtil

A named runtime environment containing a ClassLoader and Attributes.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final Environment
Inherited from org.eclipse.jetty.util.Attributes:
NULL

Method Summary

Modifier and TypeMethod and Description
public static Environment
ensure(String name)

public static Environment
get(String name)

public static Collection<Environment>
public ClassLoader

Returns:

The ClassLoader for the environment or if non set, then the ClassLoader that loaded the environment implementation.
getClassLoader
()

public String

Returns:

The case-insensitive name of the environment.
getName
()

public default void
run(Runnable
The Runnable to run in the environment.
runnable
)

Run a Runnable in the environment, i.e. with current Thread#getContextClassLoader() set to getClassLoader().

public static Environment
set(Environment environment)

Inherited from org.eclipse.jetty.util.Attributes:
asAttributeMapclearAttributesequalsequalsgetAttributegetAttributeNameSethashCodehashCoderemoveAttributesetAttributeunwrapunwrap

Field Detail

COREback to summary
public static final Environment CORE

Method Detail

ensureback to summary
public static Environment ensure(String name)
getback to summary
public static Environment get(String name)
getAllback to summary
public static Collection<Environment> getAll()
getClassLoaderback to summary
public ClassLoader getClassLoader()
Returns:ClassLoader

The ClassLoader for the environment or if non set, then the ClassLoader that loaded the environment implementation.

getNameback to summary
public String getName()
Returns:String

The case-insensitive name of the environment.

runback to summary
public default void run(Runnable runnable)

Run a Runnable in the environment, i.e. with current Thread#getContextClassLoader() set to getClassLoader().

Parameters
runnable:Runnable

The Runnable to run in the environment.

setback to summary
public static Environment set(Environment environment)
org.eclipse.jetty.util.component back to summary

public Class Environment.Named

extends Mapped
implements Environment, Dumpable
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Environment, org.eclipse.jetty.util.Attributes

Field Summary

Modifier and TypeField and Description
private static final Map<String, Environment>
private final ClassLoader
private final String

Constructor Summary

AccessConstructor and Description
public
Named(String name)

public
Named(String name, ClassLoader classLoader)

Method Summary

Modifier and TypeMethod and Description
public String
public void
dump(Appendable
The appendable to dump to
out
,
String
The indent to apply after any new lines.
indent
)

Implements org.eclipse.jetty.util.component.Dumpable.dump.

Dump this object (and children) into an Appendable using the provided indent after any new lines.
public ClassLoader
public String
public String
toString()

Overrides org.eclipse.jetty.util.Attributes.Mapped.toString.

Returns a string representation of the object.
Inherited from org.eclipse.jetty.util.Attributes.Mapped:
addAllasAttributeMapclearAttributesequalsgetAttributegetAttributeNameSethashCoderemoveAttributesetAttributesize

Field Detail

__environmentsback to summary
private static final Map<String, Environment> __environments
_classLoaderback to summary
private final ClassLoader _classLoader
_nameback to summary
private final String _name

Constructor Detail

Namedback to summary
public Named(String name)
Namedback to summary
public Named(String name, ClassLoader classLoader)

Method Detail

dumpback to summary
public String dump()

Overrides default org.eclipse.jetty.util.component.Dumpable.dump.

Annotations
@Override
dumpback to summary
public void dump(Appendable out, String indent) throws IOException

Implements org.eclipse.jetty.util.component.Dumpable.dump.

Doc from org.eclipse.jetty.util.component.Dumpable.dump.

Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.

Parameters
out:Appendable

The appendable to dump to

indent:String

The indent to apply after any new lines.

Annotations
@Override
Exceptions
IOException:
if unable to write to Appendable
getClassLoaderback to summary
public ClassLoader getClassLoader()

Implements org.eclipse.jetty.util.component.Environment.getClassLoader.

Returns:ClassLoader

Doc from org.eclipse.jetty.util.component.Environment.getClassLoader.

The ClassLoader for the environment or if non set, then the ClassLoader that loaded the environment implementation.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.eclipse.jetty.util.component.Environment.getName.

Returns:String

Doc from org.eclipse.jetty.util.component.Environment.getName.

The case-insensitive name of the environment.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jetty.util.Attributes.Mapped.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override