JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT

org.jboss.msc.service
Interface LifecycleContext

All Known Subinterfaces:
StartContext, StopContext

public interface LifecycleContext

A context object for lifecycle events.

Author:
David M. Lloyd

Method Summary
 void asynchronous()
          Call within the service lifecycle method to trigger an asynchronous lifecycle action.
 void complete()
          Call when an asynchronous lifecycle action is complete.
 ServiceController<?> getController()
          Get the associated service controller.
 

Method Detail

asynchronous

void asynchronous()
                  throws IllegalStateException
Call within the service lifecycle method to trigger an asynchronous lifecycle action. This action will not be considered complete until indicated so by calling a method on this interface.

Throws:
IllegalStateException - if called outside of the main service lifecycle method

complete

void complete()
              throws IllegalStateException
Call when an asynchronous lifecycle action is complete.

Throws:
IllegalStateException - if called before asynchronous() is called, or if the action was already completed

getController

ServiceController<?> getController()
Get the associated service controller.

Returns:
the service controller

JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT

Copyright © 2010 JBoss, a division of Red Hat, Inc.