com.sun.jersey.test.framework
Class LowLevelAppDescriptor.Builder

java.lang.Object
  extended by com.sun.jersey.test.framework.AppDescriptor.AppDescriptorBuilder<LowLevelAppDescriptor.Builder,LowLevelAppDescriptor>
      extended by com.sun.jersey.test.framework.LowLevelAppDescriptor.Builder
Enclosing class:
LowLevelAppDescriptor

public static class LowLevelAppDescriptor.Builder
extends AppDescriptor.AppDescriptorBuilder<LowLevelAppDescriptor.Builder,LowLevelAppDescriptor>

The builder for building a low-level application descriptor.

If properties of the builder are not modified default values be utilized. The default value for the context path is an empty string.

After the build() has been invoked the state of the builder will be reset to the default values.


Field Summary
protected  String contextPath
           
protected  ResourceConfig rc
           
 
Fields inherited from class com.sun.jersey.test.framework.AppDescriptor.AppDescriptorBuilder
cc
 
Constructor Summary
LowLevelAppDescriptor.Builder(Class... classes)
          Create a builder with one or more root resource and provider classes.
LowLevelAppDescriptor.Builder(ResourceConfig rc)
          Create a builder with a resource configuration.
LowLevelAppDescriptor.Builder(String... packages)
          Create a builder with one or more package names where root resource and provider classes reside.
 
Method Summary
 LowLevelAppDescriptor build()
          Build the low-level application descriptor.
 LowLevelAppDescriptor.Builder contextPath(String contextPath)
          Set the context path.
protected  void reset()
           
 
Methods inherited from class com.sun.jersey.test.framework.AppDescriptor.AppDescriptorBuilder
clientConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rc

protected final ResourceConfig rc

contextPath

protected String contextPath
Constructor Detail

LowLevelAppDescriptor.Builder

public LowLevelAppDescriptor.Builder(String... packages)
                              throws IllegalArgumentException
Create a builder with one or more package names where root resource and provider classes reside.

An instance of PackagesResourceConfig will be created and set as the resource configuration.

Parameters:
packages - one or more package names where root resource and provider classes reside.
Throws:
IllegalArgumentException - if packages is null.

LowLevelAppDescriptor.Builder

public LowLevelAppDescriptor.Builder(Class... classes)
                              throws IllegalArgumentException
Create a builder with one or more root resource and provider classes.

An instance of ClassNamesResourceConfig will be created and set as the resource configuration.

Parameters:
classes - one or more root resource and provider classes.
Throws:
IllegalArgumentException - if classes is null.

LowLevelAppDescriptor.Builder

public LowLevelAppDescriptor.Builder(ResourceConfig rc)
Create a builder with a resource configuration.

Parameters:
rc - the resource configuration.
Throws:
IllegalArgumentException - if rc is null.
Method Detail

contextPath

public LowLevelAppDescriptor.Builder contextPath(String contextPath)
Set the context path.

Parameters:
contextPath - the context path to the application.
Returns:
this builder.
Throws:
IllegalArgumentException - if contextPath is null.

build

public LowLevelAppDescriptor build()
Build the low-level application descriptor. .

Specified by:
build in class AppDescriptor.AppDescriptorBuilder<LowLevelAppDescriptor.Builder,LowLevelAppDescriptor>
Returns:
the low-level application descriptor.

reset

protected void reset()
Overrides:
reset in class AppDescriptor.AppDescriptorBuilder<LowLevelAppDescriptor.Builder,LowLevelAppDescriptor>


Copyright © 2013 Oracle Corporation. All Rights Reserved.