Modifier and Type | Field and Description |
---|---|
static String |
CLASSNAME_ANNOTATIONS_CONFIG_BUILDER
If the annotations module is on the classpath, also enable annotations config builder
|
protected static String |
CLASSNAME_DEFAULT_CONFIG_BUILDER
Don't use a class object so the core doesn't depend on mule-module-spring-config.
|
protected static String |
CLASSNAME_DEFAULT_IDLE_CONFIG_BUILDER
This builder sets up the configuration for an idle Mule node - a node that
doesn't do anything initially but is fed configuration during runtime
|
protected static String |
CLASSNAME_SPRING_CONFIG_BUILDER
Required to support the '-config spring' shortcut.
|
static String[][] |
CLI_OPTIONS |
static String |
DEFAULT_APP_CONFIGURATION |
static String |
DEFAULT_CONFIGURATION |
protected static MuleContext |
muleContext
The MuleContext should contain anything which does not belong in the Registry.
|
Constructor and Description |
---|
MuleServer() |
MuleServer(String configResources) |
MuleServer(String[] args)
Configure the server with command-line arguments.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAnnotationsConfigBuilder(List<ConfigurationBuilder> builders)
If the annotations module is on the classpath, add the annotations config builder to the
list.
|
protected void |
addStartupPropertiesConfigBuilder(List<ConfigurationBuilder> builders) |
protected ConfigurationBuilder |
createConfigurationBuilder() |
protected MuleConfiguration |
createMuleConfiguration() |
protected void |
doShutdown() |
static String |
getConfigBuilderClassName()
Returns the class name of the configuration builder used to create this
MuleServer.
|
String |
getConfigurationResources()
Getter for property messengerURL.
|
Log |
getLogger() |
MuleContext |
getMuleContext() |
static String |
getStartupPropertiesFile() |
protected void |
init(String[] args) |
void |
initialize()
Initializes this daemon.
|
static void |
main(String[] args)
Application entry point.
|
void |
registerShutdownHook() |
void |
run()
Overloaded the [main] thread run method.
|
static void |
setConfigBuilderClassName(String builderClassName)
Sets the configuration builder to use for this server.
|
void |
setConfigurationResources(String configurationResources)
Setter for property configurationResources.
|
static void |
setStartupPropertiesFile(String startupPropertiesFile) |
void |
shutdown()
shutdown the server.
|
void |
shutdown(Throwable e)
Will shut down the server displaying the cause and time of the shutdown
|
void |
start(boolean ownThread,
boolean registerShutdownHook)
Start the mule server
|
void |
unregisterShutdownHook() |
public static final String[][] CLI_OPTIONS
protected static final String CLASSNAME_DEFAULT_CONFIG_BUILDER
protected static final String CLASSNAME_DEFAULT_IDLE_CONFIG_BUILDER
protected static final String CLASSNAME_SPRING_CONFIG_BUILDER
public static final String CLASSNAME_ANNOTATIONS_CONFIG_BUILDER
public static final String DEFAULT_CONFIGURATION
public static final String DEFAULT_APP_CONFIGURATION
protected static MuleContext muleContext
public MuleServer()
public MuleServer(String configResources)
public MuleServer(String[] args) throws IllegalArgumentException
args
- Command line args passed in from the main(String[])
methodIllegalArgumentException
- if an argument is passed in that is not recognised by the Mule Serverpublic static void main(String[] args) throws Exception
args
- command-line argsException
- if there is an exception creating the MuleServerprotected void init(String[] args) throws IllegalArgumentException
IllegalArgumentException
public void start(boolean ownThread, boolean registerShutdownHook)
ownThread
- determines if the server will run in its own daemon thread or
the current calling threadregisterShutdownHook
- whether to register the default Mule Server shutdown hock. this will shut down mule cleanly if
the JVM is shutdown. The only reason not to register this hook is to override it with a custom versionpublic void run()
public static void setConfigBuilderClassName(String builderClassName) throws ClassNotFoundException
SpringXmlConfigurationBuilder
.builderClassName
- the configuration builder FQN to useClassNotFoundException
- if the class with the given name can not be
loadedpublic static String getConfigBuilderClassName()
public void initialize() throws Exception
Exception
- if failed to initializeprotected ConfigurationBuilder createConfigurationBuilder() throws ConfigurationException
ConfigurationException
protected void addAnnotationsConfigBuilder(List<ConfigurationBuilder> builders) throws Exception
Exception
protected void addStartupPropertiesConfigBuilder(List<ConfigurationBuilder> builders) throws IOException
IOException
protected MuleConfiguration createMuleConfiguration()
public void shutdown(Throwable e)
e
- the exception that caused the shutdownpublic void shutdown()
protected void doShutdown()
public Log getLogger()
public void registerShutdownHook()
public void unregisterShutdownHook()
public String getConfigurationResources()
public void setConfigurationResources(String configurationResources)
configurationResources
- New value of property configurationResources.public static String getStartupPropertiesFile()
public static void setStartupPropertiesFile(String startupPropertiesFile)
public MuleContext getMuleContext()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.