Class AbstractRestServer

All Implemented Interfaces:
Disposable, Observable<RestEndpoint>, Observers<RestEndpoint, RestServer>, RestServer, BaseLocatorAccessor, BaseLocatorAccessor.BaseLocatorBuilder<RestServer>, BaseLocatorAccessor.BaseLocatorMutator, BaseLocatorAccessor.BaseLocatorProperty, MediaTypeFactoryLookup, MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup, RealmAccessor, RealmAccessor.RealmBuilder<RestServer>, RealmAccessor.RealmMutator, RealmAccessor.RealmProperty
Direct Known Subclasses:
JdkHttpRestServer, LoopbackRestServer

public abstract class AbstractRestServer extends AbstractObservable<RestEndpoint, HttpRequest> implements RestServer

Implementation of the base functionality of the RestServer interface omitting the HTTP handling part being the foundation for various RestServer implementations such as JdkHttpRestServer or LoopbackRestServer. The AbstractRestServer is preconfigured with the following MediaTypeFactory instances:

In your sub-classes, overwrite the method initMedaTypeFactories(), therein calling addMediaTypeFactory(MediaTypeFactory) to add (by also invoking super's initMedaTypeFactories()) or to set your own (without invoking super's initMedaTypeFactories()) MediaTypeFactory instances.

Set the system property SystemProperty.LOG_DEBUG to true (set when invoking the JRA by passing the argument -Dlog.debug=true to the java executable) to log additional erroneous situations e.g. related to content types and accept types alongside marshaling and unmarshaling.