org.odata4j.jersey.producer.server
Class ODataJerseyServer

java.lang.Object
  extended by org.odata4j.jersey.producer.server.ODataJerseyServer
All Implemented Interfaces:
ODataServer

public class ODataJerseyServer
extends Object
implements ODataServer

OData server using the Jersey JAX-RS and Sun's HTTP server implementation.


Constructor Summary
ODataJerseyServer(String appBaseUri)
           
ODataJerseyServer(String appBaseUri, Class<? extends Application> odataApp, Class<? extends Application> rootApp)
           
 
Method Summary
 ODataJerseyServer addHttpServerFilter(com.sun.net.httpserver.Filter filter)
           
<T extends ContainerRequestFilter>
ODataJerseyServer
addJerseyRequestFilter(Class<T> filter)
           
<T extends ResourceFilterFactory>
ODataJerseyServer
addJerseyResourceFilter(Class<T> filter)
           
<T extends ContainerResponseFilter>
ODataJerseyServer
addJerseyResponseFilter(Class<T> filter)
           
protected  Map<String,Object> buildPropertiesAndFeatures()
           
protected  Iterable<com.sun.net.httpserver.HttpContext> getHttpContexts()
           
protected  com.sun.net.httpserver.HttpServer getHttpServer()
           
protected  void initHttpContext(com.sun.net.httpserver.HttpContext context)
           
 ODataJerseyServer setHttpServerAuthenticator(com.sun.net.httpserver.Authenticator authenticator)
           
 ODataJerseyServer setJerseyFeature(String feature, boolean value)
           
 ODataJerseyServer setJerseyTrace(boolean enabled)
          Enabling this feature can be useful in tracking down issues related to selecting the resource class
 ODataServer setODataApplication(Class<? extends Application> odataApp)
          Sets the OData application.
 ODataServer setRootApplication(Class<? extends Application> rootApp)
          Sets the root application.
 ODataServer start()
          Starts the OData server.
 ODataServer stop()
          Stops the OData server.
 ODataJerseyServer stop(int delaySeconds)
          Stops synchronously, handy for unit test scenarios.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODataJerseyServer

public ODataJerseyServer(String appBaseUri)

ODataJerseyServer

public ODataJerseyServer(String appBaseUri,
                         Class<? extends Application> odataApp,
                         Class<? extends Application> rootApp)
Method Detail

addHttpServerFilter

public ODataJerseyServer addHttpServerFilter(com.sun.net.httpserver.Filter filter)

addJerseyRequestFilter

public <T extends ContainerRequestFilter> ODataJerseyServer addJerseyRequestFilter(Class<T> filter)

addJerseyResourceFilter

public <T extends ResourceFilterFactory> ODataJerseyServer addJerseyResourceFilter(Class<T> filter)

addJerseyResponseFilter

public <T extends ContainerResponseFilter> ODataJerseyServer addJerseyResponseFilter(Class<T> filter)

buildPropertiesAndFeatures

protected Map<String,Object> buildPropertiesAndFeatures()

getHttpContexts

protected Iterable<com.sun.net.httpserver.HttpContext> getHttpContexts()

getHttpServer

protected com.sun.net.httpserver.HttpServer getHttpServer()

initHttpContext

protected void initHttpContext(com.sun.net.httpserver.HttpContext context)

setHttpServerAuthenticator

public ODataJerseyServer setHttpServerAuthenticator(com.sun.net.httpserver.Authenticator authenticator)

setJerseyFeature

public ODataJerseyServer setJerseyFeature(String feature,
                                          boolean value)

setJerseyTrace

public ODataJerseyServer setJerseyTrace(boolean enabled)
Enabling this feature can be useful in tracking down issues related to selecting the resource class


setODataApplication

public ODataServer setODataApplication(Class<? extends Application> odataApp)
Description copied from interface: ODataServer
Sets the OData application.

Specified by:
setODataApplication in interface ODataServer
Parameters:
odataApp - the OData application class
Returns:
this server
See Also:
AbstractODataApplication, DefaultODataApplication

setRootApplication

public ODataServer setRootApplication(Class<? extends Application> rootApp)
Description copied from interface: ODataServer
Sets the root application.

Specified by:
setRootApplication in interface ODataServer
Parameters:
rootApp - the root application class
Returns:
this server
See Also:
RootApplication

start

public ODataServer start()
Description copied from interface: ODataServer
Starts the OData server.

Specified by:
start in interface ODataServer
Returns:
this server

stop

public ODataServer stop()
Description copied from interface: ODataServer
Stops the OData server.

Specified by:
stop in interface ODataServer
Returns:
this server

stop

public ODataJerseyServer stop(int delaySeconds)
Stops synchronously, handy for unit test scenarios.

Parameters:
delaySeconds - seconds to wait for clean termination
Returns:
this instance for call chaining


http://odata4j.org