Package org.opensaml.xmlsec.agreement.impl

# Class DigestMethod

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.xmlsec.agreement.impl.DigestMethod

All Implemented Interfaces:
  `Cloneable`, `Component`, `DestructableComponent`, `InitializableComponent`, `CloneableKeyAgreementParameter`, `KeyAgreementParameter`, `XMLExpressableKeyAgreementParameter`

public class DigestMethod extends AbstractInitializableComponent implements XMLExpressableKeyAgreementParameter, CloneableKeyAgreementParameter
Key agreement parameter to support use of `DigestMethod` values.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`DigestMethod.Parser`
Implementation of `KeyAgreementParameterParser`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`algorithm`
Algorithm URI.

## Constructor Summary

Constructors
Constructor
Description
`DigestMethod()`

## Method Summary

Modifier and Type
Method
Description
`XMLObject`
`buildXMLObject()`
Build an `XMLObject` instance representing this parameter.
`DigestMethod`
`clone()`
Clone the parameter instance.
`protected void`
`doInitialize()`
`static DigestMethod`
`fromXMLObject(DigestMethod xmlObject)`
Create and initialize a new instance from the specified `XMLObject`.
`String`
`getAlgorithm()`
Get the algorithm URI.
`void`
`setAlgorithm(String newAlgorithm)`
Set the algorithm URI.

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### algorithm

@Nullable private String algorithm
Algorithm URI.

## Constructor Details

### DigestMethod

public DigestMethod()

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### getAlgorithm

@Nullable public String getAlgorithm()
Get the algorithm URI.

Returns:
  the algorithm URI

### setAlgorithm

public void setAlgorithm(@Nullable String newAlgorithm)
Set the algorithm URI.

Parameters:
  `newAlgorithm` - the algorithm URI

### clone

public DigestMethod clone()
Clone the parameter instance.

Specified by:
  `clone` in interface `CloneableKeyAgreementParameter`
Overrides:
  `clone` in class `Object`
Returns:
  the cloned parameter

### buildXMLObject

@Nonnull public XMLObject buildXMLObject()
Build an `XMLObject` instance representing this parameter.

Specified by:
  `buildXMLObject` in interface `XMLExpressableKeyAgreementParameter`
Returns:
  the XML object instance

### fromXMLObject

@Nonnull public static DigestMethod fromXMLObject(@Nonnull DigestMethod xmlObject) throws ComponentInitializationException
Create and initialize a new instance from the specified `XMLObject`.

Parameters:
  `xmlObject` - the XML object
Returns:
  new parameter instance
Throws:
  `ComponentInitializationException` - if component initialization fails