org.glassfish.api.admin
Annotation Type ExecuteOn


@Retention(value=RUNTIME)
@Documented
@Target(value=TYPE)
public @interface ExecuteOn

Annotation to qualify when an action like a command is targeted to be run on a cluster or a set of instances. Some actions may run only on DAS, or only on instances, by default they run on both the DAS and the instances.

Author:
Jerome Dochez

Optional Element Summary
 java.lang.Class<? extends ClusterExecutor> executor
          Identifies the ClusterExecutor that is responsible for remotely executing commands on the target clusters or instances.
 FailurePolicy ifFailure
          Identifies the expected behaviour from the framework if any of the clustered invocation failed.
 FailurePolicy ifOffline
          Identifies the expected behaviour from the framework if any of the clustered invocation could not be invoked because the remote server was offline.
 RuntimeType[] value
          Returns an array of process types on which the annotated action should run
 

value

public abstract RuntimeType[] value
Returns an array of process types on which the annotated action should run

Returns:
array of target process types
Default:
{org.glassfish.api.admin.RuntimeType.DAS, org.glassfish.api.admin.RuntimeType.INSTANCE}

executor

public abstract java.lang.Class<? extends ClusterExecutor> executor
Identifies the ClusterExecutor that is responsible for remotely executing commands on the target clusters or instances. The provider will be looked up in the habitat by its type.

Returns:
a ClusterExecutor type or null to use the default executor that takes the "target" command parameter to
Default:
org.glassfish.api.admin.ExecuteOn.TargetBasedExecutor.class

ifOffline

public abstract FailurePolicy ifOffline
Identifies the expected behaviour from the framework if any of the clustered invocation could not be invoked because the remote server was offline.

Returns:
the action the framework should perform if any of the remote invocation of this command cannot be executed due to the server being offline.
Default:
org.glassfish.api.admin.FailurePolicy.Warn

ifFailure

public abstract FailurePolicy ifFailure
Identifies the expected behaviour from the framework if any of the clustered invocation failed.

Returns:
the action the framework should perform if any of the remote invocation of this command fails.
Default:
org.glassfish.api.admin.FailurePolicy.Error


Copyright © 2012 GlassFish Community. All Rights Reserved.