Top Description Fields Constructors Methods
org.eclipse.jetty.ee10.webapp

public Class Configurations

extends AbstractList<Configuration>
implements Dumpable
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.util.component.Dumpable
Imports
java.io.IOException, java.util.AbstractList, .ArrayList, .Arrays, .Collections, .ConcurrentModificationException, .HashMap, .HashSet, .Iterator, .List, .ListIterator, .Map, .ServiceLoader, .Set, org.eclipse.jetty.server.Server, org.eclipse.jetty.util.Loader, .TopologicalSort, .TypeUtil, org.eclipse.jetty.util.annotation.Name, org.eclipse.jetty.util.component.Dumpable, .DumpableCollection, org.eclipse.jetty.util.thread.AutoLock, org.slf4j.Logger, .LoggerFactory

An ordered list of Configuration instances.

The ordering of Configurations will initially be the order in which they are added. The sort() method can be used to apply a TopologicalSort to the ordering as defined by the Configuration#getDependencies() and Configuration#getDependents() methods. Instances that do not have ordering dependencies will maintain their add order, as will additions/insertions made after the the sort.

If an added Configuration returns a value for Configuration#replaces() then the added instance will replace any existing instance of that type or that has already replaced that type.

Field Summary

Modifier and TypeField and Description
private static final List<Configuration>
private static final Set<String>
private static final AutoLock
private static final List<Configuration>
private final List<Configuration>
private static final Logger
public static final String
Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
public
public
public
Configurations(Configuration... configurations)

public
Configurations(String... configurationClassNames)

Method Summary

Modifier and TypeMethod and Description
public boolean
add(Configuration
element to be appended to this list
configuration
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Appends the specified element to the end of this list (optional operation).

public void
add(Configuration...
element to be appended to this list
configurations
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Appends the specified element to the end of this list (optional operation).

public void
add(String...
element to be appended to this list
configClass
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Appends the specified element to the end of this list (optional operation).

private boolean
pack-priv static void
public void
clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Removes all of the elements from this list (optional operation).

public boolean
configure(WebAppContext
The webapp to configure
webapp
)

Returns: false if a Configuration#abort(WebAppContext) returns true, true otherwise

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 <T> T
get(Class<? extends T> configClass)

public Configuration
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.

public <T> List<T>
getConfigurations(Class<? extends T> configClass)

public List<Configuration>
public static List<Configuration>
public static Configurations

Returns:

A copy of the server default ClassList instance of the configuration classes for this server. Changes to the returned list will not change the server default.
getServerDefault
(Server
The server the default is for
server
)

Get/Create the server default Configuration ClassList.

public Iterator<Configuration>
iterator()

Overrides java.util.AbstractList.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Returns an iterator over the elements in this list in proper sequence.

protected static Configuration
public void
public void
public void
remove(Configuration... configurations)

public final void
remove(Class<? extends Configuration>... configClass)

public void
remove(String... configClass)

public void
set(Configuration... configurations)

public void
set(String... configClass)

public static void
setKnown(String... classes)

public static Configurations

Returns:

the server default ClassList instance of the configuration classes for this server. Changes to this list will change the server default instance.
setServerDefault
(Server
The server the default is for
server
)

Get/Set/Create the server default Configuration ClassList.

public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.

public void
sort()

public static void
sort(List<Configuration> configurations)

public Configuration[]
toArray()

Overrides java.util.AbstractCollection.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element).

public String
toString()

Overrides java.util.AbstractCollection.toString.

Returns a string representation of this collection.

public String[]
Inherited from java.util.AbstractList:
addaddAllequalshashCodeindexOflastIndexOflistIteratorlistIteratorremoveremoveRangesetsubList

Field Detail

__knownback to summary
private static final List<Configuration> __known
__knownByClassNameback to summary
private static final Set<String> __knownByClassName
__lockback to summary
private static final AutoLock __lock
__unavailableback to summary
private static final List<Configuration> __unavailable
_configurationsback to summary
private final List<Configuration> _configurations
LOGback to summary
private static final Logger LOG
SERVER_DEFAULT_ATTRback to summary
public static final String SERVER_DEFAULT_ATTR

Constructor Detail

Configurationsback to summary
public Configurations()
Configurationsback to summary
public Configurations(List<Configuration> configurations)
Configurationsback to summary
public Configurations(Configuration... configurations)
Configurationsback to summary
public Configurations(String... configurationClassNames)

Method Detail

addback to summary
public boolean add(Configuration configuration)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Doc from java.util.AbstractList.add.

Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Parameters
configuration:Configuration

element to be appended to this list

Returns:boolean

true (as specified by Collection#add)

Annotations
@Override
addback to summary
public void add(Configuration... configurations)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Doc from java.util.AbstractList.add.

Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Parameters
configurations:Configuration[]

element to be appended to this list

Returns:void

true (as specified by Collection#add)

addback to summary
public void add(String... configClass)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Doc from java.util.AbstractList.add.

Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Parameters
configClass:String[]

element to be appended to this list

Returns:void

true (as specified by Collection#add)

addConfigurationback to summary
private boolean addConfiguration(Configuration configuration)
cleanKnownback to summary
pack-priv static void cleanKnown()
clearback to summary
public void clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Doc from java.util.AbstractList.clear.

Removes all of the elements from this list (optional operation). The list will be empty after this call returns.

configureback to summary
public boolean configure(WebAppContext webapp) throws Exception
Parameters
webapp:WebAppContext

The webapp to configure

Returns:boolean

false if a Configuration#abort(WebAppContext) returns true, true otherwise

Exceptions
Exception:
Thrown by Configuration#configure(WebAppContext)
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
getback to summary
public <T> T get(Class<? extends T> configClass)
getback to summary
public Configuration get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.AbstractList.get.

Returns the element at the specified position in this list.

Parameters
index:int

Doc from java.util.List.get.

index of the element to return

Returns:Configuration

Doc from java.util.List.get.

the element at the specified position in this list

Annotations
@Override
getConfigurationsback to summary
public <T> List<T> getConfigurations(Class<? extends T> configClass)
getConfigurationsback to summary
public List<Configuration> getConfigurations()
getKnownback to summary
public static List<Configuration> getKnown()
getServerDefaultback to summary
public static Configurations getServerDefault(Server server)

Get/Create the server default Configuration ClassList.

Get the class list from: a Server bean; or the attribute (which can either be a ClassList instance or an String[] of class names); or a new instance with default configuration classes.

Parameters
server:Server

The server the default is for

Returns:Configurations

A copy of the server default ClassList instance of the configuration classes for this server. Changes to the returned list will not change the server default.

iteratorback to summary
public Iterator<Configuration> iterator()

Overrides java.util.AbstractList.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Doc from java.util.AbstractList.iterator.

Returns an iterator over the elements in this list in proper sequence.

Returns:Iterator<Configuration>

an iterator over the elements in this list in proper sequence

Annotations
@Override
newConfigurationback to summary
protected static Configuration newConfiguration(String classname)
postConfigureback to summary
public void postConfigure(WebAppContext webapp) throws Exception
preConfigureback to summary
public void preConfigure(WebAppContext webapp) throws Exception
removeback to summary
public void remove(Configuration... configurations)
removeback to summary
public final void remove(Class<? extends Configuration>... configClass)
Annotations
@SafeVarargs
removeback to summary
public void remove(String... configClass)
setback to summary
public void set(Configuration... configurations)
setback to summary
public void set(String... configClass)
setKnownback to summary
public static void setKnown(String... classes)
setServerDefaultback to summary
public static Configurations setServerDefault(Server server)

Get/Set/Create the server default Configuration ClassList.

Get the class list from: a Server bean; or the attribute (which can either be a ClassList instance or an String[] of class names); or a new instance with default configuration classes.

This method also adds the obtained ClassList instance as a dependent bean on the server and clears the attribute

Parameters
server:Server

The server the default is for

Returns:Configurations

the server default ClassList instance of the configuration classes for this server. Changes to this list will change the server default instance.

sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

sortback to summary
public void sort()
sortback to summary
public static void sort(List<Configuration> configurations)
toArrayback to summary
public Configuration[] toArray()

Overrides java.util.AbstractCollection.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Doc from java.util.List.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element).

The returned array will be "safe" in that no references to it are maintained by this list. (In other words, this method must allocate a new array even if this list is backed by an array). The caller is thus free to modify the returned array.

This method acts as bridge between array-based and collection-based APIs.

Returns:Configuration[]

an array containing all of the elements in this list in proper sequence

toStringback to summary
public String toString()

Overrides java.util.AbstractCollection.toString.

Doc from java.util.AbstractCollection.toString.

Returns a string representation of this collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String#valueOf(Object).

Returns:String

a string representation of this collection

Annotations
@Override
toStringArrayback to summary
public String[] toStringArray()