org.axonframework.saga
Class SagaInitializationPolicy

java.lang.Object
  extended by org.axonframework.saga.SagaInitializationPolicy

public class SagaInitializationPolicy
extends Object

Describes the conditions under which a Saga should be created, and which AssociationValue it should be initialized with.

Since:
2.1
Author:
Allard Buijze

Field Summary
static SagaInitializationPolicy NONE
          Value indicating there is no Initialization required
 
Constructor Summary
SagaInitializationPolicy(SagaCreationPolicy creationPolicy, AssociationValue initialAssociationValue)
          Creates an instance using the given creationPolicy and initialAssociationValue.
 
Method Summary
 SagaCreationPolicy getCreationPolicy()
          Returns the creation policy
 AssociationValue getInitialAssociationValue()
          Returns the initial association value for a newly created saga.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final SagaInitializationPolicy NONE
Value indicating there is no Initialization required

Constructor Detail

SagaInitializationPolicy

public SagaInitializationPolicy(SagaCreationPolicy creationPolicy,
                                AssociationValue initialAssociationValue)
Creates an instance using the given creationPolicy and initialAssociationValue. To indicate that no saga should be created, use NONE instead of this constructor.

Parameters:
creationPolicy - The policy describing the condition to create a new instance
initialAssociationValue - The association value a new Saga instance should be given
Method Detail

getCreationPolicy

public SagaCreationPolicy getCreationPolicy()
Returns the creation policy

Returns:
the creation policy

getInitialAssociationValue

public AssociationValue getInitialAssociationValue()
Returns the initial association value for a newly created saga. May be null.

Returns:
the initial association value for a newly created saga


Copyright © 2010-2016. All Rights Reserved.