Top Description Fields Constructors Methods
jakarta.resource.spi.work

public Class HintsContext

extends Object
implements WorkContext
Class Inheritance
All Implemented Interfaces
jakarta.resource.spi.work.WorkContext, java.io.Serializable
Imports
java.io.Serializable, java.util.Map, .HashMap

A standard WorkContext that allows a Work instance to propagate quality-of-service (QoS) hints about the Work to the WorkManager.
Since
1.6
See Also
jakarta.resource.spi.work.WorkContextProvider

Field Summary

Modifier and TypeField and Description
protected String
pack-priv Map<String, Serializable>
public static final String
protected String
public static final String
private static final long
serialVersionUID

Determines if a deserialized instance of this class is compatible with this class.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getDescription()

Implements jakarta.resource.spi.work.WorkContext.getDescription.

Get the brief description of the role played by the WorkContext and any other related debugging information.
public Map<String, Serializable>

Returns:

Map keyed on hint name
getHints
()

Get all hints

public String
getName()

Implements jakarta.resource.spi.work.WorkContext.getName.

Get the associated name of the WorkContext.
public void
setDescription(String
The description
description
)

Set a brief description of the role played by the instance of HintsContext and any other related debugging information.

public void
setHint(String
name of the hint to set
hintName
,
Serializable
value to set
value
)

Set a Hint and a related value.

public void
setName(String
The name
name
)

Set the associated name of the HintsContext.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descriptionback to summary
protected String description
hintsback to summary
pack-priv Map<String, Serializable> hints
LONGRUNNING_HINTback to summary
public static final String LONGRUNNING_HINT
nameback to summary
protected String name
NAME_HINTback to summary
public static final String NAME_HINT
serialVersionUIDback to summary
private static final long serialVersionUID

Determines if a deserialized instance of this class is compatible with this class.

Constructor Detail

HintsContextback to summary
public HintsContext()

Method Detail

getDescriptionback to summary
public String getDescription()

Implements jakarta.resource.spi.work.WorkContext.getDescription.

Doc from jakarta.resource.spi.work.WorkContext.getDescription.

Get the brief description of the role played by the WorkContext and any other related debugging information. This could be used by the WorkManager and the resource adapter for debugging purposes.

Returns:String

the associated description of the WorkContext

Annotations
@Override
getHintsback to summary
public Map<String, Serializable> getHints()

Get all hints

Returns:Map<String, Serializable>

Map keyed on hint name

getNameback to summary
public String getName()

Implements jakarta.resource.spi.work.WorkContext.getName.

Doc from jakarta.resource.spi.work.WorkContext.getName.

Get the associated name of the WorkContext. This could be used by the WorkManager and the resource adapter for debugging purposes.

Returns:String

the associated name of the WorkContext

Annotations
@Override
setDescriptionback to summary
public void setDescription(String description)

Set a brief description of the role played by the instance of HintsContext and any other related debugging information. This could be used by the resource adapter and the WorkManager for logging and debugging purposes.

Parameters
description:String

The description

setHintback to summary
public void setHint(String hintName, Serializable value)

Set a Hint and a related value. The hintName must be non-Null. Standard HintNames are defined in the Jakarta Connectors specification. Use of "jakarta.resource." prefixed hintNames are reserved for use by the Jakarta Connectors specification.

Parameters
hintName:String

name of the hint to set

value:Serializable

value to set

setNameback to summary
public void setName(String name)

Set the associated name of the HintsContext. This could be used by the resource adapter and the WorkManager for logging and debugging purposes.

Parameters
name:String

The name