public interface ServerAdmin
An instance of the ServerAdmin can be acquired by calling
method, which can be used
to do all exposed management operations programatically.ServerAdminImpl.getInstance()
The ServerAdmin API in most of the cases is used with the
AbstractServerInterceptor
in-order to dynamically change the
runtime configuration by provisioning the deployment units or updating the deployment units.
Modifier and Type | Method and Description |
---|---|
void |
addOrUpdateDeploymentUnit(DeploymentUnitDefinition def)
Switch deployment unit into a new version
|
void |
addOrUpdateDeploymentUnit(String id,
byte[] config)
Writes the configuration file ultra-unit.xml to the specified deployment unit from a byte stream
|
void |
defineNonPersistedAlertConfig(AlertConfigurationDefinition alertConfig)
Defines a new alert configuration into the alert configuration registry without persistence
|
void |
definePersistedAlertConfig(AlertConfigurationDefinition alertConfig)
Defines a new alert configuration into the alert configuration registry with persistence
|
void |
endMaintenance()
Resume normal operations from maintenance
|
List<String> |
getActingServerGroups()
Gives an unmodifiable list containing the names of the server groups this server is acting as
|
List<String> |
getActingServerNames()
Gives an unmodifiable list containing the names of the server this server is acting as
|
<T> T |
getBean(String id,
Class<T> type)
Gets a spring bean of the given type from the root static context of the ESB
|
String |
getBuildVersions()
Gets the build versions of the ESB as determined from the JAR Manifest at startup
|
String |
getInstallationName()
Gives the name of the installation which uniquely identifies a set of related nodes in a deployment
|
List<String> |
getProxyServiceIds()
Retrieves the deployed proxy service id list (of all deployment units) in the UltraESB server
|
String |
getServerGroup()
Gives the server group configured for this server
|
String |
getServerName()
Gives the name of the server which has to be unique in a clustered deployment
|
String |
getSpaceName()
Gives the space name for this server
|
int |
getUserDefinedStatusCode()
Get the user defined status code
|
boolean |
isActingAsServer(String serverName)
Whether the server is acting as the given server name
|
boolean |
isActingAsServerGroup(String serverGroup)
Whether the server is acting as the given server group
|
boolean |
isClustered()
Used to check whether the server is in a clustered deployment
|
boolean |
isDeploymentUnitLoaded(String id)
Whether there is a deployment unit loaded with the given identifier
|
boolean |
isStarted()
Return true if the system is currently running, and not begun a shutdown sequence
|
boolean |
purgeAllOutdatedDeploymentUnits()
Purge all outdated configuration fragments
|
void |
refresh()
Refreshes the server manager, this is only called by some human intervention and will only fire the
LifecycleEventType.ON_SERVER_REFRESH event sending a signal
to the server interceptors to act on if interested about this human initiated action |
boolean |
removeNonPersistedAlertConfig(String stream,
long id)
Removes the custom alert configuration identified by the 'stream' and 'id'
|
void |
scheduleTask(TimerTask task,
long... timeout)
Ability to schedule a timer task in the ESB, the variable argument timeout accepts one or two arguments
not passing a long value for the variable argument method or passing more than 2 arguments to the variable
argument will cause a
BusRuntimeException |
void |
setUserDefinedStatusCode(int code)
Set the current value for the user defined status code
|
void |
shutdown()
Shutdown the UltraESB instance
|
void |
shutdown(long waitMillis)
Shutdown the UltraESB instance, giving a grace period of waitMillis
|
void |
startActingAsServer(String actingServerName)
Starts acting as the given server name, which means that all the pinned proxy services and deployment units to
the given node will be started in the current server, unless it also is pinned into the current server.
|
void |
startActingAsServerGroup(String actingServerGroup)
Starts acting as the given server group, which means that all the pinned proxy services and deployment units to
the given server group will be started in the current server, unless it also is pinned into the current server
group.
|
void |
startActingAsServerGroup(String actingServerGroup,
String scriptToExecute)
Starts acting as the given server group, which means that all the pinned proxy services and deployment units to
the given server group will be started in the current server, unless it also is pinned into the current server
group.
|
void |
startMaintenance()
Put the server into the maintenance mode
|
void |
stop()
Stop the UltraESB server instance (without entering the maintenance mode)
|
void |
stopActingAsServer(String actingServerName)
Stops acting as the given server name, which means that all the pinned proxy services and deployment units to
the given node will be stopped in the current server, unless it also is pinned into the current server.
|
void |
stopActingAsServerGroup(String actingServerGroup)
Stops acting as the given server group, which means that all the pinned proxy services and deployment units to
the given node will be stopped in the current server group, unless it also is pinned into the current
server group.
|
void |
stopActingAsServerGroup(String actingServerGroup,
String scriptToExecute)
Stops acting as the given server group, which means that all the pinned proxy services and deployment units to
the given node will be stopped in the current server group, unless it also is pinned into the current
server group.
|
void |
stopGracefully(long gracePeriod)
Stops the server gracefully within the specified grace period.
|
void |
unloadAllDeploymentUnits()
Unload all deployment units currently loaded
|
void |
unloadDeploymentUnit(String id)
Unload deployment unit with the given id
|
boolean |
waitUntilIdle(long waitMillis,
long endTime)
Wait and return when the server is idle, or at endTime
|
boolean isStarted()
boolean isClustered()
void shutdown()
void shutdown(long waitMillis)
waitMillis
- the grace period for shutdownboolean waitUntilIdle(long waitMillis, long endTime)
waitMillis
- maximum wait timeendTime
- actual deadlinevoid startMaintenance()
void endMaintenance()
void stopGracefully(long gracePeriod)
gracePeriod
- the maximum time period the stop action will wait for the server to idle after entering the
maintenance modevoid stop()
void refresh()
LifecycleEventType.ON_SERVER_REFRESH
event sending a signal
to the server interceptors to act on if interested about this human initiated actionString getServerName()
String getInstallationName()
String getServerGroup()
String getSpaceName()
int getUserDefinedStatusCode()
List<String> getProxyServiceIds()
void setUserDefinedStatusCode(int code)
code
- the status code valueList<String> getActingServerNames()
List<String> getActingServerGroups()
boolean isActingAsServer(String serverName)
serverName
- to check for whether the server is acting as itboolean isActingAsServerGroup(String serverGroup)
serverGroup
- to check for whether the server is acting as the given groupvoid startActingAsServer(String actingServerName)
actingServerName
- the name of the server to act as, in addition to selfvoid startActingAsServerGroup(String actingServerGroup)
actingServerGroup
- the name of the server group to act as, in addition to self server groupvoid startActingAsServerGroup(String actingServerGroup, String scriptToExecute)
actingServerGroup
- the name of the server group to act as, in addition to self server groupscriptToExecute
- the path to the unix script to be executedvoid stopActingAsServer(String actingServerName)
actingServerName
- the name of the server to stop acting asvoid stopActingAsServerGroup(String actingServerGroup)
actingServerGroup
- the name of the server group to stop acting asvoid stopActingAsServerGroup(String actingServerGroup, String scriptToExecute)
actingServerGroup
- the name of the server group to stop acting asscriptToExecute
- the path to the unix script to be executedvoid addOrUpdateDeploymentUnit(DeploymentUnitDefinition def)
def
- deployment unit definition to be added or switchedvoid addOrUpdateDeploymentUnit(String id, byte[] config)
id
- the deployment unit identifier which the configuration file is written toconfig
- the byte array containing file contents TODO change the byte stream to a compressed stream for better efficiencyboolean isDeploymentUnitLoaded(String id)
id
- the identifier to be checked for existencevoid unloadDeploymentUnit(String id)
id
- deployment unit identifiervoid unloadAllDeploymentUnits()
boolean purgeAllOutdatedDeploymentUnits()
void definePersistedAlertConfig(AlertConfigurationDefinition alertConfig)
alertConfig
- the alert configuration to be added to the registryvoid defineNonPersistedAlertConfig(AlertConfigurationDefinition alertConfig)
alertConfig
- the alert configuration to be added to the registryboolean removeNonPersistedAlertConfig(String stream, long id)
stream
- stream for the policy alert configurationid
- id for the steamvoid scheduleTask(TimerTask task, long... timeout)
BusRuntimeException
task
- the timer task to be scheduled, this will be wrapped in an internal timer task implementation
to make sure none of the tasks are causing the global ESB timer any issuestimeout
- if one argument is provided, it uses the Timer.schedule(java.util.TimerTask, long)
method while 2 arguments will invoke the Timer.schedule(java.util.TimerTask, long, long)
<T> T getBean(String id, Class<T> type)
T
- the type parameter of the beanid
- the bean identifier of the spring bean to be retrievedtype
- the class of the bean to be retrievedString getBuildVersions()
Copyright © 2010–2016 AdroitLogic. All rights reserved.