Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.repository
Class RepositoryLibrary.Administrator

    java.lang.Object
      org.modeshape.repository.service.AbstractServiceAdministrator
          org.modeshape.repository.RepositoryLibrary.Administrator

All Implemented Interfaces:
  ServiceAdministrator

Enclosing class:
  RepositoryLibrary

    protected class RepositoryLibrary.Administrator

extends AbstractServiceAdministrator

The administrative component for this service.

Author:
  Randall Hauch

Nested Class Summary

Nested classes/interfaces inherited from interface org.modeshape.repository.service.ServiceAdministrator
`ServiceAdministrator.State`

Constructor Summary
`protected` | `RepositoryLibrary.Administrator()`

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` | `doCheckIsTerminated()` Subclasses should implement this method to determine whether the service has completed shutdown.
`protected void` | `doShutdown(ServiceAdministrator.State fromState)` Implementation of the functionality to switch to the shutdown state.
`protected void` | `doStart(ServiceAdministrator.State fromState)` Implementation of the functionality to switch to the started state.

Methods inherited from class org.modeshape.repository.service.AbstractServiceAdministrator
`doPause, getServiceName, getServiceName, getState, isPaused, isShutdown, isStarted, isTerminated, pause, setState, setState, shutdown, start`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RepositoryLibrary.Administrator

    protected RepositoryLibrary.Administrator()

Method Detail

### doStart

    protected void doStart(ServiceAdministrator.State fromState)

  Implementation of the functionality to switch to the started state. This method is only called if the state from which the service is transitioning is appropriate (`ServiceAdministrator.State.PAUSED`). This method does nothing by default, and should be overridden if needed.

  Overrides:
    `doStart` in class `AbstractServiceAdministrator`
  Parameters:
    `fromState` - the state from which this service is transitioning; never null

### doShutdown

    protected void doShutdown(ServiceAdministrator.State fromState)

  Implementation of the functionality to switch to the shutdown state. This method is only called if the state from which the service is transitioning is appropriate (`ServiceAdministrator.State.STARTED` or `ServiceAdministrator.State.PAUSED`). This method does nothing by default, and should be overridden if needed.

  Overrides:
    `doShutdown` in class `AbstractServiceAdministrator`
  Parameters:
    `fromState` - the state from which this service is transitioning; never null

### awaitTermination

    public boolean awaitTermination(long timeout,
                                    TimeUnit unit)
                             throws InterruptedException

  Blocks until the shutdown has completed, or the timeout occurs, or the current thread is interrupted, whichever happens first.

  Parameters:
    `timeout` - the maximum time to wait
    `unit` - the time unit of the timeout argument
  Returns:
    `true` if this service complete shut down and `false` if the timeout elapsed before it was shut down completely
  Throws:
    `InterruptedException` - if interrupted while waiting

### doCheckIsTerminated

    protected boolean doCheckIsTerminated()

  Subclasses should implement this method to determine whether the service has completed shutdown.

  Specified by:
    `doCheckIsTerminated` in class `AbstractServiceAdministrator`
  Returns:
    true if terminated, or false otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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