|
Runtime | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gmf.runtime.common.core.util.EnumeratedType
org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy
public abstract class ExecutionStrategy
An enumeration of provider execution strategies.
Each service provider has a ProviderPriority that is declared
in its extension descriptor. It is the
ExecutionStrategy that
determines how service provider priorities are used to select a provider to
service each client request. For example, if the
FIRST
is used, the provider with the highest priority will give an answer to the
request.
org.eclipse.gmf.runtime.common.core.service,
Serialized Form| Field Summary | |
|---|---|
static ExecutionStrategy |
FIRST
Executes an operation on the first provider of the highest priority that provides the operation. |
static ExecutionStrategy |
FORWARD
Executes an operation on all providers that provide the operation, in order from highest to lowest priority. |
static ExecutionStrategy |
LAST
Executes an operation on the last provider of the lowest priority that provides the operation. |
static ProviderPriority[] |
PRIORITIES
The list of pre-defined provider priorities. |
static ExecutionStrategy |
REVERSE
Executes an operation on all providers that provide the operation, in reverse order from lowest to highest priority. |
| Constructor Summary | |
|---|---|
protected |
ExecutionStrategy(java.lang.String name)
Constructs a new execution strategy with the specified name. |
protected |
ExecutionStrategy(java.lang.String name,
int ordinal)
Constructs a new execution strategy with the specified name and ordinal. |
| Method Summary | |
|---|---|
abstract java.util.List |
execute(Service service,
IOperation operation)
Executes the specified operation on providers obtained from the specified service, according to this execution strategy. |
protected java.util.List |
getProviders(Service service,
ExecutionStrategy strategy,
ProviderPriority priority,
IOperation operation)
Retrieves a list of providers of the specified priority that provide the specified operation. |
protected java.util.List |
getProviders(Service service,
ProviderPriority priority)
Retrieves a list of providers of the specified priority. |
java.util.List |
getUncachedProviders(Service service,
ProviderPriority priority,
IOperation operation)
Retrieves a list of providers of the specified priority that provide the specified operation. |
protected java.util.List |
getValues()
Retrieves the list of constants for this enumerated type. |
| Methods inherited from class org.eclipse.gmf.runtime.common.core.util.EnumeratedType |
|---|
equals, getName, getOrdinal, hashCode, readResolve, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ProviderPriority[] PRIORITIES
public static final ExecutionStrategy FIRST
public static final ExecutionStrategy LAST
public static final ExecutionStrategy FORWARD
public static final ExecutionStrategy REVERSE
| Constructor Detail |
|---|
protected ExecutionStrategy(java.lang.String name)
name - The name of the new execution strategy.
protected ExecutionStrategy(java.lang.String name,
int ordinal)
name - The name of the new execution strategy.ordinal - The ordinal for the new execution strategy.| Method Detail |
|---|
protected java.util.List getValues()
getValues in class EnumeratedType
public abstract java.util.List execute(Service service,
IOperation operation)
service - The service from which to obtain the providers.operation - The operation to be executed.
public java.util.List getUncachedProviders(Service service,
ProviderPriority priority,
IOperation operation)
service - The service used by the strategypriority - The priority of providers to be retrieved.operation - The operation that the provides must provide.
protected final java.util.List getProviders(Service service,
ProviderPriority priority)
service - The service used by the strategypriority - The priority of providers to be retrieved.
protected final java.util.List getProviders(Service service,
ExecutionStrategy strategy,
ProviderPriority priority,
IOperation operation)
service - The service used by the strategystrategy - The strategy used by the servicepriority - The priority of providers to be retrieved.operation - The operation that the provides must provide.
|
Runtime | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.