Package org.opensaml.saml.common.messaging.context

# Class SAMLBindingContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
org.opensaml.saml.common.messaging.context.SAMLBindingContext

All Implemented Interfaces:
  `Iterable<BaseContext>`

public final class SAMLBindingContext extends BaseContext
Context for holding information related to the SAML binding in use.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext

`BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside`

## Field Summary

Fields
Modifier and Type
Field
Description
`private BindingDescriptor`
`bindingDescriptor`
The binding descriptor.
`private String`
`bindingUri`
The binding URI.
`private boolean`
`hasBindingSignature`
Flag indicating whether the message is signed at the binding level.
`private boolean`
`isIntendedDestinationEndpointURIRequired`
Flag indicating whether the binding in use requires the presence within the message of information indicating the intended message destination endpoint URI.
`private String`
`relayState`
The relay state associated with the message.

## Constructor Summary

Constructors
Constructor
Description
`SAMLBindingContext()`

## Method Summary

Modifier and Type
Method
Description
`BindingDescriptor`
`getBindingDescriptor()`
Get the SAML binding descriptor.
`String`
`getBindingUri()`
Get the SAML binding URI.
`String`
`getRelayState()`
Gets the relay state.
`boolean`
`hasBindingSignature()`
Get the flag indicating whether the message is signed at the binding level.
`boolean`
`isIntendedDestinationEndpointURIRequired()`
Get the flag indicating whether the binding in use requires the presence within the message of information indicating the intended message destination endpoint URI.
`void`
`setBindingDescriptor(BindingDescriptor descriptor)`
Set the SAML binding descriptor.
`void`
`setBindingUri(String newBindingUri)`
Set the SAML binding URI.
`void`
`setHasBindingSignature(boolean flag)`
Set the flag indicating whether the message is signed at the binding level.
`void`
`setIntendedDestinationEndpointURIRequired(boolean flag)`
Set the flag indicating whether the binding in use requires the presence within the message of information indicating the intended message destination endpoint URI.
`void`
`setRelayState(String state)`
Sets the relay state.

### Methods inherited from class org.opensaml.messaging.context.BaseContext

`addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParent`

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Field Details

### relayState

@Nullable @NotEmpty private String relayState
The relay state associated with the message.

### bindingDescriptor

@Nullable private BindingDescriptor bindingDescriptor
The binding descriptor.

### bindingUri

@Nullable @NotEmpty private String bindingUri
The binding URI.

### hasBindingSignature

private boolean hasBindingSignature
Flag indicating whether the message is signed at the binding level.

### isIntendedDestinationEndpointURIRequired

private boolean isIntendedDestinationEndpointURIRequired
Flag indicating whether the binding in use requires the presence within the message of information indicating the intended message destination endpoint URI.

## Constructor Details

### SAMLBindingContext

public SAMLBindingContext()

## Method Details

### getRelayState

@Nullable @NotEmpty public String getRelayState()
Gets the relay state.

Returns:
  relay state associated with this protocol exchange, may be null

### setRelayState

public void setRelayState(@Nullable String state)
Sets the relay state.

Parameters:
  `state` - relay state associated with this protocol exchange

### getBindingUri

@Nullable @NotEmpty public String getBindingUri()
Get the SAML binding URI.

Returns:
  Returns the bindingUri.

### setBindingUri

public void setBindingUri(@Nullable String newBindingUri)
Set the SAML binding URI.

Parameters:
  `newBindingUri` - the new binding URI

### getBindingDescriptor

@Nullable public BindingDescriptor getBindingDescriptor()
Get the SAML binding descriptor.

Returns:
  the descriptor

### setBindingDescriptor

public void setBindingDescriptor(@Nullable BindingDescriptor descriptor)
Set the SAML binding descriptor.

Parameters:
  `descriptor` - the new binding descriptor

### hasBindingSignature

public boolean hasBindingSignature()
Get the flag indicating whether the message is signed at the binding level.

Returns:
  true if message was signed at the binding level, otherwise false

### setHasBindingSignature

public void setHasBindingSignature(boolean flag)
Set the flag indicating whether the message is signed at the binding level.

Parameters:
  `flag` - true if message was signed at the binding level, otherwise false

### isIntendedDestinationEndpointURIRequired

public boolean isIntendedDestinationEndpointURIRequired()
Get the flag indicating whether the binding in use requires the presence within the message of information indicating the intended message destination endpoint URI.

Returns:
  true if required, false otherwise

### setIntendedDestinationEndpointURIRequired

public void setIntendedDestinationEndpointURIRequired(boolean flag)
Set the flag indicating whether the binding in use requires the presence within the message of information indicating the intended message destination endpoint URI.

Parameters:
  `flag` - true if required, false otherwise