Class ResteasySeInstance
- java.lang.Object
-
- org.jboss.resteasy.core.se.ResteasySeInstance
-
- All Implemented Interfaces:
SeBootstrap.Instance
public class ResteasySeInstance extends Object implements SeBootstrap.Instance
An implementation of aSeBootstrap.Instance.- Since:
- 6.1
- Author:
- James R. Perkins
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.ws.rs.SeBootstrap.Instance
SeBootstrap.Instance.StopResult
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SeBootstrap.Configurationconfiguration()Provides access to the configuration actually used by the implementation used to create this instance.static CompletionStage<SeBootstrap.Instance>create(Application application, SeBootstrap.Configuration configuration)static CompletionStage<SeBootstrap.Instance>create(Class<? extends Application> applicationClass, SeBootstrap.Configuration configuration)CompletionStage<SeBootstrap.Instance.StopResult>stop()Initiate immediate shutdown of running application instance.<T> Tunwrap(Class<T> nativeClass)Provides access to the wrapped native handle of the application instance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.ws.rs.SeBootstrap.Instance
stopOnShutdown
-
-
-
-
Method Detail
-
create
public static CompletionStage<SeBootstrap.Instance> create(Application application, SeBootstrap.Configuration configuration)
Creates a newSeBootstrap.Instancebased on the application and configuration passed in.Note that if your
Applicationdoes not override theApplication.getClasses()orApplication.getSingletons()a Jandex index is used to find resources and providers. It's suggested that your application has aMETA-INF/jandex.idxor you provide an index with theConfigurationOption.JANDEX_INDEXconfiguration option. If neither of those exist, the class path itself is indexed which could have significant performance impacts.- Parameters:
application- the application to use for this instanceconfiguration- the configuration used to configure the instance- Returns:
- a
CompletionStagewhich asynchronously produces andSeBootstrap.Instance
-
create
public static CompletionStage<SeBootstrap.Instance> create(Class<? extends Application> applicationClass, SeBootstrap.Configuration configuration)
Creates a newSeBootstrap.Instancebased on the application and configuration passed in.Note that if your
Applicationdoes not override theApplication.getClasses()orApplication.getSingletons()a Jandex index is used to find resources and providers. It's suggested that your application has aMETA-INF/jandex.idxor you provide an index with theConfigurationOption.JANDEX_INDEXconfiguration option. If neither of those exist, the class path itself is indexed which could have significant performance impacts.- Parameters:
applicationClass- the application to use for this instanceconfiguration- the configuration used to configure the instance- Returns:
- a
CompletionStagewhich asynchronously produces andSeBootstrap.Instance
-
configuration
public SeBootstrap.Configuration configuration()
Description copied from interface:SeBootstrap.InstanceProvides access to the configuration actually used by the implementation used to create this instance.This may, or may not, be the same instance passed to
SeBootstrap.start(Application, Configuration), not even an equal instance, as implementations MAY create a new intance and MUST update at least thePORTproperty with the actually used value. Portable applications should not make any assumptions but always explicitly read the actual values from the configuration returned from this method.- Specified by:
configurationin interfaceSeBootstrap.Instance- Returns:
- The configuration actually used to create this instance.
-
stop
public CompletionStage<SeBootstrap.Instance.StopResult> stop()
Description copied from interface:SeBootstrap.InstanceInitiate immediate shutdown of running application instance.- Specified by:
stopin interfaceSeBootstrap.Instance- Returns:
CompletionStageasynchronously shutting down this application instance.
-
unwrap
public <T> T unwrap(Class<T> nativeClass)
Description copied from interface:SeBootstrap.InstanceProvides access to the wrapped native handle of the application instance.Implementations may, or may not, have native handles. Portable applications should not invoke this method, as the outcome is undefined.
- Specified by:
unwrapin interfaceSeBootstrap.Instance- Type Parameters:
T- Requested type of the native handle to return.- Parameters:
nativeClass- Requested type of the native handle to return.- Returns:
- Native handle of the running application instance or
nullif the implementation has no native handle.
-
-