Top Description Fields Constructors Methods
org.glassfish.hk2.runlevel

public Class RunLevelContext

extends Object
implements Context<RunLevel>
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.api.Context
Annotations
@Service
@Named:DefaultRunLevelContext
@Visibility:LOCAL
Imports
java.lang.annotation.Annotation, jakarta.inject.Inject, .Named, org.glassfish.hk2.api.ActiveDescriptor, .Context, .DescriptorVisibility, .ServiceHandle, .Visibility, org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext, org.jvnet.hk2.annotations.Service

This is the implementation of the Context for the RunLevel scope
Author
jwells

Field Summary

Modifier and TypeField and Description
private final AsyncRunLevelContext
public static final String
CONTEXT_NAME

The name under which this context will be advertised

Constructor Summary

AccessConstructor and Description
private
RunLevelContext(AsyncRunLevelContext asyncRunLevelContext)

Method Summary

Modifier and TypeMethod and Description
public boolean
containsKey(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.containsKey.

Determines if this context has a value for the given key

public void
destroyOne(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.destroyOne.

This method is called when ServiceHandle#destroy() method is called.

public <U> U
findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)

Implements org.glassfish.hk2.api.Context.findOrCreate.

Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance.

public Class<? extends Annotation>
getScope()

Implements org.glassfish.hk2.api.Context.getScope.

The scope for which this is the context

public boolean
isActive()

Implements org.glassfish.hk2.api.Context.isActive.

True if this context is active, false otherwise

public void
shutdown()

Implements org.glassfish.hk2.api.Context.shutdown.

Shut down this context.

public boolean
supportsNullCreation()

Implements org.glassfish.hk2.api.Context.supportsNullCreation.

Returns true if the findOrCreate method can return null

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

asyncRunLevelContextback to summary
private final AsyncRunLevelContext asyncRunLevelContext
CONTEXT_NAMEback to summary
public static final String CONTEXT_NAME

The name under which this context will be advertised

Constructor Detail

RunLevelContextback to summary
private RunLevelContext(AsyncRunLevelContext asyncRunLevelContext)
Annotations
@Inject

Method Detail

containsKeyback to summary
public boolean containsKey(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.containsKey.

Doc from org.glassfish.hk2.api.Context.containsKey.

Determines if this context has a value for the given key

Annotations
@Override
destroyOneback to summary
public void destroyOne(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.destroyOne.

Doc from org.glassfish.hk2.api.Context.destroyOne.

This method is called when ServiceHandle#destroy() method is called. It is up to the context implementation whether or not to honor this destruction request based on the lifecycle requirements of the context

Annotations
@Override
findOrCreateback to summary
public <U> U findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)

Implements org.glassfish.hk2.api.Context.findOrCreate.

Doc from org.glassfish.hk2.api.Context.findOrCreate.

Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance. If there is already a contextual instance it is returned. If parent is null then this must work like the find call

Annotations
@Override
getScopeback to summary
public Class<? extends Annotation> getScope()

Implements org.glassfish.hk2.api.Context.getScope.

Doc from org.glassfish.hk2.api.Context.getScope.

The scope for which this is the context

Annotations
@Override
isActiveback to summary
public boolean isActive()

Implements org.glassfish.hk2.api.Context.isActive.

Doc from org.glassfish.hk2.api.Context.isActive.

True if this context is active, false otherwise

Annotations
@Override
shutdownback to summary
public void shutdown()

Implements org.glassfish.hk2.api.Context.shutdown.

Doc from org.glassfish.hk2.api.Context.shutdown.

Shut down this context.

Annotations
@Override
supportsNullCreationback to summary
public boolean supportsNullCreation()

Implements org.glassfish.hk2.api.Context.supportsNullCreation.

Doc from org.glassfish.hk2.api.Context.supportsNullCreation.

Returns true if the findOrCreate method can return null

Annotations
@Override