org.glassfish.jersey.server.internal.routing
Class RuntimeModelBuilder

java.lang.Object
  extended by org.glassfish.jersey.server.internal.routing.RuntimeModelBuilder

public final class RuntimeModelBuilder
extends Object

This is a common base for root resource and sub-resource runtime model builder.

Author:
Marek Potociar (marek.potociar at oracle.com)

Constructor Summary
RuntimeModelBuilder()
           
 
Method Summary
 Router buildModel(boolean subResourceMode)
          Build a runtime model.
 void process(Resource resource, boolean subResourceMode)
          Process a single resource model and add it to the currently build runtime routing and accepting model.
 void setBoundProviders(MultivaluedMap<Class<? extends Annotation>,ContainerRequestFilter> nameBoundRequestFilters, MultivaluedMap<Class<? extends Annotation>,ContainerResponseFilter> nameBoundResponseFilters, MultivaluedMap<Class<? extends Annotation>,ReaderInterceptor> nameBoundReaderInterceptors, MultivaluedMap<Class<? extends Annotation>,WriterInterceptor> nameBoundWriterInterceptors, List<DynamicBinder> dynamicBinders)
          Set the name bound filters and dynamic binders.
 void setGlobalInterceptors(Collection<ReaderInterceptor> readerInterceptors, Collection<WriterInterceptor> writerInterceptors)
          Set global reader and writer interceptors.
 void setWorkers(MessageBodyWorkers workers)
          Set the message body workers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeModelBuilder

public RuntimeModelBuilder()
Method Detail

process

public void process(Resource resource,
                    boolean subResourceMode)
Process a single resource model and add it to the currently build runtime routing and accepting model.

Parameters:
resource - resource model to be processed.
subResourceMode - if true, all resources will be processed as sub-resources.

buildModel

public Router buildModel(boolean subResourceMode)
Build a runtime model.

Parameters:
subResourceMode - if true, all resources will be processed as sub-resources.
Returns:
runtime request routing root.

setWorkers

public void setWorkers(MessageBodyWorkers workers)
Set the message body workers.

Parameters:
workers - new message body workers.

setGlobalInterceptors

public void setGlobalInterceptors(Collection<ReaderInterceptor> readerInterceptors,
                                  Collection<WriterInterceptor> writerInterceptors)
Set global reader and writer interceptors.

Parameters:
readerInterceptors - global reader interceptors.
writerInterceptors - global writer interceptors.

setBoundProviders

public void setBoundProviders(MultivaluedMap<Class<? extends Annotation>,ContainerRequestFilter> nameBoundRequestFilters,
                              MultivaluedMap<Class<? extends Annotation>,ContainerResponseFilter> nameBoundResponseFilters,
                              MultivaluedMap<Class<? extends Annotation>,ReaderInterceptor> nameBoundReaderInterceptors,
                              MultivaluedMap<Class<? extends Annotation>,WriterInterceptor> nameBoundWriterInterceptors,
                              List<DynamicBinder> dynamicBinders)
Set the name bound filters and dynamic binders.

Parameters:
nameBoundRequestFilters - name bound request filters.
nameBoundResponseFilters - name bound response filters.
nameBoundReaderInterceptors - name bound reader interceptors.
nameBoundWriterInterceptors - name bound writer interceptors.
dynamicBinders - dynamic binders.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.