|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.repository.ModeShapeEngine
@Immutable public class ModeShapeEngine
A single instance of the ModeShape services, which is obtained after setting up the configuration
.
ModeShapeConfiguration
Nested Class Summary | |
---|---|
protected class |
ModeShapeEngine.ConfigurationScanner
The component responsible for reading the configuration repository and (eventually) for propagating changes in the configuration repository into the services. |
Field Summary | |
---|---|
protected ModeShapeConfiguration.ConfigurationDefinition |
configuration
|
static String |
CONFIGURATION_REPOSITORY_NAME
|
protected ExecutionContext |
context
|
Constructor Summary | |
---|---|
protected |
ModeShapeEngine(ExecutionContext context,
ModeShapeConfiguration.ConfigurationDefinition configuration)
|
Method Summary | |
---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
Blocks until the shutdown has completed, or the timeout occurs, or the current thread is interrupted, whichever happens first. |
protected boolean |
checkRunning()
|
protected Graph |
getConfigurationGraph()
Get a graph to the configuration content. |
ExecutionContext |
getExecutionContext()
Get the context in which this engine is executing. |
Graph |
getGraph(ExecutionContext context,
String sourceName)
Get a graph to the underlying source, using the supplied context. |
Graph |
getGraph(String sourceName)
Get a graph to the underlying source. |
protected MimeTypeDetector |
getMimeTypeDetector()
Return the component that is able to detect MIME types given the name of a stream and a stream. |
Problems |
getProblems()
Get the problems that were encountered when setting up this engine from the configuration. |
RepositoryConnectionFactory |
getRepositoryConnectionFactory()
Get a factory of connections, backed by the RepositorySor |
RepositoryService |
getRepositoryService()
Get the repository service. |
RepositorySource |
getRepositorySource(String repositoryName)
Get the RepositorySource instance used by this engine. |
SequencingService |
getSequencingService()
Get the sequencing service. |
void |
shutdown()
Shutdown this engine to close all connections, terminate any ongoing background operations (such as sequencing), and reclaim any resources that were acquired by this engine. |
void |
start()
Start this engine to make it available for use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIGURATION_REPOSITORY_NAME
protected final ModeShapeConfiguration.ConfigurationDefinition configuration
protected final ExecutionContext context
Constructor Detail |
---|
protected ModeShapeEngine(ExecutionContext context, ModeShapeConfiguration.ConfigurationDefinition configuration)
Method Detail |
---|
public Problems getProblems()
public final ExecutionContext getExecutionContext()
public final RepositorySource getRepositorySource(String repositoryName)
RepositorySource
instance used by this engine.
repositoryName
- the name of the repository source
IllegalStateException
- if this engine was not started
public final RepositoryConnectionFactory getRepositoryConnectionFactory()
IllegalStateException
- if this engine was not started
public final RepositoryService getRepositoryService()
IllegalStateException
- if this engine was not started
public final Graph getGraph(String sourceName)
sourceName
- the name of the source
IllegalArgumentException
- if the source name is null
RepositorySourceException
- if a source with the supplied name does not exist
IllegalStateException
- if this engine was not started
public final Graph getGraph(ExecutionContext context, String sourceName)
context
.
context
- the context of execution for this graph; may not be nullsourceName
- the name of the source
IllegalArgumentException
- if the context or source name are null
RepositorySourceException
- if a source with the supplied name does not exist
IllegalStateException
- if this engine was not started
public final SequencingService getSequencingService()
IllegalStateException
- if this engine was not started
protected final MimeTypeDetector getMimeTypeDetector()
IllegalStateException
- if this engine was not started
protected final boolean checkRunning()
public void start()
IllegalStateException
- if this method is called when already shut down.shutdown()
public void shutdown()
start()
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
timeout
- the maximum time to wait for each component in this engineunit
- the time unit of the timeout argument
InterruptedException
- if interrupted while waitingprotected Graph getConfigurationGraph()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |