org.modeshape.jboss.managed
Class ManagedEngine

java.lang.Object
  extended by org.modeshape.jboss.managed.ManagedEngine
All Implemented Interfaces:
ModeShapeManagedObject

@Immutable
public final class ManagedEngine
extends Object
implements ModeShapeManagedObject

A ManagedEngine instance is a JBoss managed object for a JcrEngine.


Constructor Summary
ManagedEngine()
           
ManagedEngine(JcrEngine engine)
          Creates a JBoss managed object from the specified engine.
 
Method Summary
 Collection<ManagedConnector> getConnectors()
          Obtains the managed connectors of this engine.
protected  JcrEngine getEngine()
           
 Collection<ManagedRepository> getRepositories()
          Obtains the managed repositories of this engine.
 ManagedRepository getRepository(String repositoryName)
          Obtains the specified managed repository of this engine.
 ManagedSequencingService getSequencingService()
          Obtains the managed sequencing service.
 String getVersion()
          Obtains the version (build number) of this ModeShape instance.
 boolean isRunning()
          Indicates if the managed engine is running.
 void restart()
          First shutdowns the engine and then starts it back up again.
 void setConfigURL(URL configurationUrl)
           
 void setEngine(JcrEngine jcrEngine)
           
 void shutdown()
          Performs an engine shutdown.
 void start()
          Starts the engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedEngine

public ManagedEngine()

ManagedEngine

public ManagedEngine(JcrEngine engine)
Creates a JBoss managed object from the specified engine.

Parameters:
engine - the engine being managed (never null)
Method Detail

getConnectors

public Collection<ManagedConnector> getConnectors()
Obtains the managed connectors of this engine. This is a JBoss managed operation.

Returns:
an unmodifiable collection of managed connectors (never null)

getRepositories

public Collection<ManagedRepository> getRepositories()
Obtains the managed repositories of this engine. This is a JBoss managed operation.

Returns:
an unmodifiable collection of repositories (never null)

getRepository

public ManagedRepository getRepository(String repositoryName)
Obtains the specified managed repository of this engine. This is called by the JNDIManagedRepositories when a JNDI lookup is performed to find a repository.

Parameters:
repositoryName - for the repository to be returned
Returns:
a repository or null if repository doesn't exist

getSequencingService

public ManagedSequencingService getSequencingService()
Obtains the managed sequencing service. This is a JBoss managed operation.

Returns:
the sequencing service or null if never started

getVersion

public String getVersion()
Obtains the version (build number) of this ModeShape instance. This is a JBoss managed operation.

Returns:
the ModeShape version

isRunning

public boolean isRunning()
Indicates if the managed engine is running. This is a JBoss managed operation.

Returns:
true if the engine is running

restart

public void restart()
First shutdowns the engine and then starts it back up again. This is a JBoss managed operation.

See Also:
shutdown(), start()

shutdown

public void shutdown()
Performs an engine shutdown. This is a JBoss managed operation.

See Also:
ModeShapeEngine.shutdown()

start

public void start()
Starts the engine. This is a JBoss managed operation.

See Also:
JcrEngine.start()

getEngine

protected JcrEngine getEngine()

setEngine

public void setEngine(JcrEngine jcrEngine)

setConfigURL

public void setConfigURL(URL configurationUrl)
                  throws Exception
Throws:
Exception


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.