LifeCycle
object, which can be used by the server to inform the hosting environment that it can release any resources associated with the server (presumably because the server is terminating).
@see com.sun.jini.start.NonActivatableServiceDescriptor
@see com.sun.jini.start.ServiceStarter
@author Sun Microsystems, Inc.
@since 2.0
The steps to perform these operations depend on how Hudson is launched, so the concrete instance of this method (which is VM-wide singleton) is discovered by looking up a FQCN from the system property "hudson.lifecycle". @author Kohsuke Kawaguchi @since 1.254
This class represents the entire life-cycle for a component.
Zephyr Business Solution @author Michelle LeiDefaultLifecyclePhase
adds lifecycle methods start
, stop
and dispose
.
public interface System { Property<User> admin(); } public class SystemAdminMixin implements System, Lifecyle, ... { @Structure private UnitOfWork uow; @This private Identity meAsIdentity; public void create() { String thisId = meAsIdentity.identity().get(); EntityBuilder builder = uow.newEntityBuilder( thisId + ":1", UserComposite.class ); User admin = builder.newInstance(); admin.set( admin ); } public void remove() { uow.remove( admin.get() ); } } @Mixins( SystemAdminMixin.class ) public interface SystemEntity extends System, EntityComposite {}
Can be implemented by both components (typically a Spring bean defined in a Spring {@link org.springframework.beans.factory.BeanFactory}) and containers (typically a Spring {@link ApplicationContext}). Containers will propagate start/stop signals to all components that apply.
Can be used for direct invocations or for management operations via JMX. In the latter case, the {@link org.springframework.jmx.export.MBeanExporter}will typically be defined with an {@link org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler}, restricting the visibility of activity-controlled components to the Lifecycle interface.
Note that the Lifecycle interface is only supported on top-level singleton beans. On any other component, the Lifecycle interface will remain undetected and hence ignored. Also, note that the extended {@link SmartLifecycle} interface provides more sophisticatedintegration with the container's startup and shutdown phases. @author Juergen Hoeller @since 2.0 @see SmartLifecycle @see ConfigurableApplicationContext @see org.springframework.jms.listener.AbstractMessageListenerContainer @see org.springframework.scheduling.quartz.SchedulerFactoryBean
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|