org.apache.uima.resourceSpecifier.factory
Class DeploymentDescriptorFactory

java.lang.Object
  extended by org.apache.uima.resourceSpecifier.factory.DeploymentDescriptorFactory

public final class DeploymentDescriptorFactory
extends Object

Factory class providing static API to generate UIMA AS Deployment Descriptor. Supports creation of both Primitive and Aggregate Deployment Descriptors.


Method Summary
static ColocatedDelegateConfiguration createAggregateDelegateConfiguration(String key, DelegateConfiguration... delegateConfiguration)
          Creates Delegate Configuration for a co-located delegate.
static UimaASAggregateDeploymentDescriptor createAggregateDeploymentDescriptor(ServiceContext context, DelegateConfiguration... delegateConfigurations)
          Creates new Aggregate UIMA-AS DeploymentDescriptor object.
static CollectionProcessCompleteErrorHandlingSettings createCollectionProcessCompleteErrorHandlingSettings(int timeout, Action action)
          Creates Error Handling Configuration for CPC using provided settings
static GetMetaErrorHandlingSettings createGetMetaErrorHandlingSettings()
          Creates Default Error Handling Settings for GetMeta
static GetMetaErrorHandlingSettings createGetMetaErrorHandlingSettings(int retryCount, int timeout, Action action)
          Creates Error Handling Configuration for GetMeta with provided settings
static DelegateConfiguration createPrimitiveDelegateConfiguration(String key, ErrorHandlingSettings... errorHandlingSettings)
          Creates Delegate Configuration for a Primitive delegate.
static UimaASPrimitiveDeploymentDescriptor createPrimitiveDeploymentDescriptor(ServiceContext context)
          Creates new Primitive UIMA-AS DeploymentDescriptor object.
static ProcessErrorHandlingSettings createProcessErrorHandlingSettings()
          Creates Default Error Handling Configuration for Process
static ProcessErrorHandlingSettings createProcessErrorHandlingSettings(int retryCount, int timeout, Action action, boolean continueOnRetryFailure, int thresholdCount, int thresholdWindow)
          Creates Error Handling Configuration for Process using provided settings
static RemoteDelegateConfiguration createRemoteDelegateConfiguration(String key, String brokerURL, String endpoint, SerializationStrategy serialization, ErrorHandlingSettings... errorHandlingSettings)
          Creates Delegate Configuration for a remote delegate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createAggregateDeploymentDescriptor

public static UimaASAggregateDeploymentDescriptor createAggregateDeploymentDescriptor(ServiceContext context,
                                                                                      DelegateConfiguration... delegateConfigurations)
                                                                               throws ResourceInitializationException
Creates new Aggregate UIMA-AS DeploymentDescriptor object.

Parameters:
context - - context
delegateConfigurations - - delegate configurations
Returns:
UIMA-AS aggregate deployment descriptor
Throws:
ResourceInitializationException - the resource initialization exception

createPrimitiveDeploymentDescriptor

public static UimaASPrimitiveDeploymentDescriptor createPrimitiveDeploymentDescriptor(ServiceContext context)
                                                                               throws ResourceInitializationException
Creates new Primitive UIMA-AS DeploymentDescriptor object.

Parameters:
context - - context
Returns:
UIMA-AS primitive deployment descriptor
Throws:
ResourceInitializationException - the resource initialization exception

createPrimitiveDelegateConfiguration

public static DelegateConfiguration createPrimitiveDelegateConfiguration(String key,
                                                                         ErrorHandlingSettings... errorHandlingSettings)
Creates Delegate Configuration for a Primitive delegate.

Parameters:
key - - unique delegate key
errorHandlingSettings - the error handling settings
Returns:
the delegate configuration

createAggregateDelegateConfiguration

public static ColocatedDelegateConfiguration createAggregateDelegateConfiguration(String key,
                                                                                  DelegateConfiguration... delegateConfiguration)
Creates Delegate Configuration for a co-located delegate.

Parameters:
key - - unique delegate key
delegateConfiguration - the delegate configuration
Returns:
the colocated delegate configuration

createRemoteDelegateConfiguration

public static RemoteDelegateConfiguration createRemoteDelegateConfiguration(String key,
                                                                            String brokerURL,
                                                                            String endpoint,
                                                                            SerializationStrategy serialization,
                                                                            ErrorHandlingSettings... errorHandlingSettings)
Creates Delegate Configuration for a remote delegate.

Parameters:
key - - unique delegate key
brokerURL - - broker url
endpoint - - delegate remote endpoint
serialization - - serialization strategy (xmi or binary)
errorHandlingSettings - - error handling settings for this delegate
Returns:
remote delegate configuration

createGetMetaErrorHandlingSettings

public static GetMetaErrorHandlingSettings createGetMetaErrorHandlingSettings()
Creates Default Error Handling Settings for GetMeta

Returns:
default GetMeta error handling settings

createGetMetaErrorHandlingSettings

public static GetMetaErrorHandlingSettings createGetMetaErrorHandlingSettings(int retryCount,
                                                                              int timeout,
                                                                              Action action)
Creates Error Handling Configuration for GetMeta with provided settings

Parameters:
retryCount - - retry count for GetMeta
timeout - - GetMeta timeout in millis
action - - action to take on error
Returns:
the gets the meta error handling settings

createProcessErrorHandlingSettings

public static ProcessErrorHandlingSettings createProcessErrorHandlingSettings()
Creates Default Error Handling Configuration for Process

Returns:
default Process error handling settings

createProcessErrorHandlingSettings

public static ProcessErrorHandlingSettings createProcessErrorHandlingSettings(int retryCount,
                                                                              int timeout,
                                                                              Action action,
                                                                              boolean continueOnRetryFailure,
                                                                              int thresholdCount,
                                                                              int thresholdWindow)
Creates Error Handling Configuration for Process using provided settings

Parameters:
retryCount - - number of retries
timeout - - Process timeout in millis
action - - action to take on error
continueOnRetryFailure - - continue on retry failure (true/false)
thresholdCount - - threshold limit triggering action to be taken
thresholdWindow - - error threshold window
Returns:
the process error handling settings

createCollectionProcessCompleteErrorHandlingSettings

public static CollectionProcessCompleteErrorHandlingSettings createCollectionProcessCompleteErrorHandlingSettings(int timeout,
                                                                                                                  Action action)
Creates Error Handling Configuration for CPC using provided settings

Parameters:
timeout - - CPC timeout
action - - action to take on error
Returns:
the collection process complete error handling settings


Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.