public class LoggerAssignHandler extends AbstractLogHandlerAssignmentHandler
| Modifier and Type | Field and Description |
|---|---|
static LoggerAssignHandler |
INSTANCE |
static String |
OPERATION_NAME |
| Constructor and Description |
|---|
LoggerAssignHandler() |
| Modifier and Type | Method and Description |
|---|---|
static org.jboss.msc.service.ServiceController<org.jboss.logmanager.Logger> |
addHandler(OperationContext context,
String loggerName,
String handlerName,
ServiceVerificationHandler verificationHandler)
Adds the handler, represented by the
handlerNameToAdd parameter, to the logger. |
static List<org.jboss.msc.service.ServiceController<?>> |
addHandlers(org.jboss.dmr.ModelNode handlers,
OperationContext context,
String loggerName,
ServiceVerificationHandler verificationHandler)
Adds the handlers to the logger.
|
protected String |
getHandlerName(org.jboss.dmr.ModelNode operation)
Returns the name of the handler.
|
protected String |
getLoggerName(org.jboss.dmr.ModelNode operation) |
static Collection<org.jboss.msc.service.ServiceController<?>> |
installHandlers(org.jboss.msc.service.ServiceTarget serviceTarget,
String loggerName,
org.jboss.dmr.ModelNode handlers,
ServiceVerificationHandler verificationHandler) |
protected void |
performRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model,
ServiceVerificationHandler verificationHandler,
List<org.jboss.msc.service.ServiceController<?>> newControllers)
Make any runtime changes necessary to effect the changes indicated by the given
operation. |
protected void |
updateModel(org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
Update the given node in the persistent configuration model based on the values in the given operation.
|
createFailureMessage, handlerExists, updateHandlersForAssign, updateHandlersForUnassignexecute, requiresRuntime, requiresRuntimeVerification, rollbackRuntime, updateModelpublic static final String OPERATION_NAME
public static final LoggerAssignHandler INSTANCE
protected void updateModel(org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
throws OperationFailedException
AbstractModelUpdateHandlerupdateModel in class AbstractModelUpdateHandleroperation - the operationmodel - persistent configuration model node that corresponds to the address of operationOperationFailedException - if operation is invalid or populating the model otherwise failsprotected String getHandlerName(org.jboss.dmr.ModelNode operation) throws OperationFailedException
AbstractLogHandlerAssignmentHandlergetHandlerName in class AbstractLogHandlerAssignmentHandleroperation - the model node to retrieve the name from.OperationFailedException - if a failure occurs.protected String getLoggerName(org.jboss.dmr.ModelNode operation)
protected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, ServiceVerificationHandler verificationHandler, List<org.jboss.msc.service.ServiceController<?>> newControllers) throws OperationFailedException
AbstractModelUpdateHandleroperation. Executes
after AbstractModelUpdateHandler.updateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode), so the given model
parameter will reflect any changes made in that method.
This default implementation does nothing.
performRuntime in class AbstractModelUpdateHandlercontext - the operation contextoperation - the operation being executedmodel - persistent configuration model node that corresponds to the address of operationverificationHandler - step handler that can be added as a listener to any new services installed in order to
validate the services installed correctly during the
VERIFY stagenewControllers - holder for the ServiceController for any new services installed by the method. The
method should add the ServiceController for any new services to this list. If the
overall operation needs to be rolled back, the list will be used in
AbstractModelUpdateHandler.rollbackRuntime(OperationContext, ModelNode, ModelNode, java.util.List) to automatically removed
the newly added servicesOperationFailedException - if operation is invalid or updating the runtime otherwise failspublic static org.jboss.msc.service.ServiceController<org.jboss.logmanager.Logger> addHandler(OperationContext context, String loggerName, String handlerName, ServiceVerificationHandler verificationHandler) throws OperationFailedException
handlerNameToAdd parameter, to the logger.context - the context of the operation.loggerName - the logger name.handlerName - the name of the handler to add.verificationHandler - a verification handler for the builder, or null if no verification handler
is needed.OperationFailedException - if an error occurs.public static Collection<org.jboss.msc.service.ServiceController<?>> installHandlers(org.jboss.msc.service.ServiceTarget serviceTarget, String loggerName, org.jboss.dmr.ModelNode handlers, ServiceVerificationHandler verificationHandler)
public static List<org.jboss.msc.service.ServiceController<?>> addHandlers(org.jboss.dmr.ModelNode handlers, OperationContext context, String loggerName, ServiceVerificationHandler verificationHandler) throws OperationFailedException
context - the context of the operation.loggerName - the name of the logger.verificationHandler - a verification handler for the builder, or null if no verification handler
is needed.OperationFailedException - if an error occurs.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.