Java Code Examples for org.jboss.as.controller.OperationContext#Stage
The following examples show how to use
org.jboss.as.controller.OperationContext#Stage .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ServerGroupAffectedResourceServerConfigOperationsTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void addStep(ModelNode operation, OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { if (operation.get(OP).asString().equals("verify-running-server")) { return; } super.addStep(operation, step, stage); }
Example 2
Source File: AbstractOperationTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void addStep(ModelNode operation, OperationStepHandler step, OperationContext.Stage stage, boolean addFirst) throws IllegalArgumentException { final PathAddress opAddress = PathAddress.pathAddress(operation.get(OP_ADDR)); if (!expectedSteps.contains(opAddress) && failOnUnexpected) { if (opAddress.size() == 2){ //Ignore the add/removing running server add step done by ServerAddHandler and ServerRemoveHandler if (opAddress.getElement(0).getKey().equals(HOST) && opAddress.getElement(1).getKey().equals(SERVER) && (operation.get(OP).asString().equals(ADD) || operation.get(OP).asString().equals(REMOVE))){ return; } } if (stage != Stage.VERIFY) { fail("Should not have added step for: " + opAddress); } } expectedSteps.remove(opAddress); List<OperationAndHandler> stageList = addedSteps.get(stage); if (stageList == null) { stageList = new ArrayList<OperationAndHandler>(); addedSteps.put(stage, stageList); } OperationAndHandler oah = new OperationAndHandler(operation, step); if (addFirst) { stageList.add(0, oah); } else { stageList.add(oah); } }
Example 3
Source File: ProfileIncludesHandlerTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
public void addStep(OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { if (step instanceof DomainModelIncludesValidator) { nextStep = step; } }
Example 4
Source File: ProfileIncludesHandlerTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
public void addStep(ModelNode operation, OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { if (operation.get(OP).asString().equals("verify-running-server")) { return; } super.addStep(operation, step, stage); }
Example 5
Source File: ReloadRequiredServerTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
public void addStep(OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { nextStep = step; }
Example 6
Source File: ServerGroupAffectedResourceServerConfigOperationsTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void addStep(OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { nextHandlers.add(step); }
Example 7
Source File: ServerGroupAffectedResourceServerGroupOperationsTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
public void addStep(OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { addStep(null, step, stage); }
Example 8
Source File: ServerGroupAffectedResourceServerGroupOperationsTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
public void addStep(ModelNode operation, OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { nextStep = step; nextStepOp = operation; }
Example 9
Source File: AbstractOperationTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void addStep(OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { if (stage == Stage.RUNTIME) { fail("Should not have added step"); } }
Example 10
Source File: AbstractOperationTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void addStep(ModelNode operation, OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { addStep(operation, step, stage, false); }
Example 11
Source File: AbstractOperationTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void addStep(ModelNode response, ModelNode operation, OperationStepHandler step, OperationContext.Stage stage) throws IllegalArgumentException { fail("Should not have added step"); }
Example 12
Source File: AbstractOperationTestCase.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public OperationContext.Stage getCurrentStage() { return null; }
Example 13
Source File: ControllerLogger.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@Message(id = 361, value = "Capabilities cannot be queried in stage '%s'; they are not available until stage '%s'.") IllegalStateException capabilitiesNotAvailable(OperationContext.Stage currentStage, OperationContext.Stage runtime);
Example 14
Source File: ControllerLogger.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
@LogMessage(level = Level.INFO) // use INFO -- DEBUG is too low as there's a bug here and we want to know; // WARN is too high as it likely does not harm the end user and the user can't do anything about it @Message(id = 444, value = "The handler for operation '%s' at address '%s' attempted to add a stage %s step. " + "This is not valid for a 'profile' resource on process type %s so this step will not be executed.") void invalidRuntimeStageForProfile(String operation, String address, OperationContext.Stage stage, ProcessType processType);
Example 15
Source File: ControllerLogger.java From wildfly-core with GNU Lesser General Public License v2.1 | 2 votes |
/** * Creates an exception indicating the stage is not valid for the context process type. * * @param stage the stage. * @param processType the context process type. * * @return an {@link IllegalStateException} for the error. */ @Message(id = 123, value = "Stage %s is not valid for context process type %s") IllegalStateException invalidStage(OperationContext.Stage stage, ProcessType processType);
Example 16
Source File: ControllerLogger.java From wildfly-core with GNU Lesser General Public License v2.1 | 2 votes |
/** * Creates an exception indicating the stage is already complete. * * @param stage the stage. * * @return an {@link IllegalStateException} for the error. */ @Message(id = 188, value = "Stage %s is already complete") IllegalStateException stageAlreadyComplete(OperationContext.Stage stage);