Package org.opensaml.messaging.context

# Class InOutOperationContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
org.opensaml.messaging.context.InOutOperationContext

All Implemented Interfaces:
  `Iterable<BaseContext>`

Direct Known Subclasses:
  `ProfileRequestContext`

public class InOutOperationContext extends BaseContext
An operation context which represents concretely a message exchange pattern involving an inbound message and an outbound message. This is the typical request-response pattern seen in messaging environments, and might be either server-side or client-side.

## 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 MessageContext`
`inboundContext`
The inbound message context.
`private MessageContext`
`outboundContext`
The outbound message context.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`InOutOperationContext()`
Constructor.
``
`InOutOperationContext(MessageContext inbound, MessageContext outbound)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`MessageContext`
`ensureInboundMessageContext()`
Gets the inbound message context, creating an empty one if it does not already exist.
`MessageContext`
`ensureOutboundMessageContext()`
Gets the outbound message context, creating an empty one if it does not already exist.
`MessageContext`
`getInboundMessageContext()`
The inbound message context instance.
`MessageContext`
`getOutboundMessageContext()`
The outbound message context instance.
`void`
`setInboundMessageContext(MessageContext context)`
Sets the inbound message context.
`void`
`setOutboundMessageContext(MessageContext context)`
Sets the outbound message context.

### 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

### inboundContext

@Nullable private MessageContext inboundContext
The inbound message context.

### outboundContext

@Nullable private MessageContext outboundContext
The outbound message context.

## Constructor Details

### InOutOperationContext

protected InOutOperationContext()
Constructor. Sets ID to a generated UUID and creation time to now.

### InOutOperationContext

public InOutOperationContext(@Nullable MessageContext inbound, @Nullable MessageContext outbound)
Constructor.

Parameters:
  `inbound` - the inbound message context
  `outbound` - the outbound message context

## Method Details

### getInboundMessageContext

@Nullable public MessageContext getInboundMessageContext()
The inbound message context instance.

Returns:
  the inbound message context

### ensureInboundMessageContext

@Nonnull public MessageContext ensureInboundMessageContext()
Gets the inbound message context, creating an empty one if it does not already exist.

Returns:
  an existing, or new, inbound message context
Since:
  5.0.0

### setInboundMessageContext

public void setInboundMessageContext(@Nullable MessageContext context)
Sets the inbound message context.

Parameters:
  `context` - inbound message context, may be null

### getOutboundMessageContext

@Nullable public MessageContext getOutboundMessageContext()
The outbound message context instance.

Returns:
  the outbound message context

### ensureOutboundMessageContext

@Nonnull public MessageContext ensureOutboundMessageContext()
Gets the outbound message context, creating an empty one if it does not already exist.

Returns:
  an existing, or new, outbound message context
Since:
  5.0.0

### setOutboundMessageContext

public void setOutboundMessageContext(@Nullable MessageContext context)
Sets the outbound message context.

Parameters:
  `context` - outbound message context, may be null