public interface ExtensionContext
Modifier and Type | Method and Description |
---|---|
ProcessType |
getProcessType()
Gets the type of the current process.
|
RunningMode |
getRunningMode()
Gets the current running mode of the process.
|
boolean |
isRuntimeOnlyRegistrationValid()
Gets whether it is valid for the extension to register resources, attributes or operations that do not
involve the persistent configuration, but rather only involve runtime services.
|
SubsystemRegistration |
registerSubsystem(String name)
Deprecated.
|
SubsystemRegistration |
registerSubsystem(String name,
int majorVersion,
int minorVersion)
Register a new subsystem type.
|
@Deprecated SubsystemRegistration registerSubsystem(String name)
registerSubsystem(String, int, int)
The new subsystem registration must register a handler and description for the
add
operation at its root address. The new subsystem registration must register a
remove
operation at its root address.
name
- the name of the subsystemSubsystemRegistration
IllegalStateException
- if the subsystem name has already been registeredSubsystemRegistration registerSubsystem(String name, int majorVersion, int minorVersion)
The new subsystem registration must register a handler and description for the
add
operation at its root address. The new subsystem registration must register a
remove
operation at its root address.
name
- the name of the subsystemmajorVersion
- the major version of the subsystem's management interfaceminorVersion
- the minor version of the subsystem's management interfaceSubsystemRegistration
IllegalStateException
- if the subsystem name has already been registeredProcessType getProcessType()
null
RunningMode getRunningMode()
null
boolean isRuntimeOnlyRegistrationValid()
ADMIN_ONLY
, where again the
runtime services associated with a subsystem typically would not be installedThis method is a shorthand for:
boolean valid = context.getProcessType().isServer() && context.getRunningMode() != RunningMode.ADMIN_ONLY;
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.