|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Gateway
Gateway for configuring, launching, and destroying a Launcher instance. The GatewayFactory is used to create Gateways, for example:
Gateway embeddedGateway = GatewayFactory.createGateway();
Once a Gateway has been created, it can be immediately launched with the default environment. The default environment is to have GATEWAY_HOME set to the parent directory of the location of the JAR file containing the Gateway class file. Any configuration files, content files, and the license file are searched for under this directory.
If another environment is desired, or properties in the Gateway's configuration file (e.g. gateway-config.xml) are to be overridden, then invoke the configure(java.util.Properties) method first with the desired properties.
GatewayFactory
Field Summary | |
---|---|
static String |
BYPASS_PLATFORM_CHECK_PROPERTY
|
static String |
GATEWAY_CONFIG_DIRECTORY_PROPERTY
The location of configuration files used by the Gateway. |
static String |
GATEWAY_CONFIG_PROPERTY
The fully qualified path to the configuration file of the Gateway. |
static String |
GATEWAY_HOME_PROPERTY
The root directory of the Gateway. |
static String |
GATEWAY_LICENSE_DIRECTORY_PROPERTY
The location of the license file used by the Gateway. |
static String |
GATEWAY_LOG_DIRECTORY_PROPERTY
The location of the Gateway's log files. |
static String |
GATEWAY_TEMP_DIRECTORY_PROPERTY
The location of temp files used by the Gateway. |
static String |
GATEWAY_USER_LIB_DIRECTORY_PROPERTY
The location custom code used by the Gateway. |
static String |
GATEWAY_WEB_DIRECTORY_PROPERTY
The location of web content served by the Gateway. |
static String |
LOG4J_CONFIG_PROPERTY
The fully qualified path to a Log4J configuration file. |
static String |
LOG4J_CONFIG_REFRESH_INTERVAL
By default, the Gateway will check for changes in the log4j config file every minute. |
static String |
OVERRIDE_LOGGING
In order to override the Gateway's default logging configuration this property can be set to true . |
static String |
TCP_BACKLOG
|
static String |
TCP_MAXIMUM_READ_BUFFER_SIZE
|
static String |
TCP_MINIMUM_READ_BUFFER_SIZE
|
static String |
TCP_NO_DELAY
|
static String |
TCP_PROCESSOR_COUNT
|
static String |
TCP_READ_BUFFER_SIZE
|
static String |
TCP_WRITE_TIMEOUT
|
static String |
UDP_MAXIMUM_READ_BUFFER_SIZE
|
static String |
UDP_MINIMUM_READ_BUFFER_SIZE
|
static String |
UDP_READ_BUFFER_SIZE
|
Method Summary | |
---|---|
void |
destroy()
Stops the running Gateway. |
Properties |
getProperties()
Get the current set of properties used to configure the Gateway. |
void |
launch()
Starts the Gateway, which in turn initializes and starts up all the configured services, including binding to host and port specified in the service's accept tag. |
void |
setMBeanServer(MBeanServer server)
Set an MBeanServer on the Gateway. |
void |
setProperties(Properties properties)
Set up the Gateway with the given properties. |
Field Detail |
---|
static final String GATEWAY_HOME_PROPERTY
static final String GATEWAY_CONFIG_PROPERTY
static final String GATEWAY_CONFIG_DIRECTORY_PROPERTY
static final String GATEWAY_WEB_DIRECTORY_PROPERTY
static final String GATEWAY_TEMP_DIRECTORY_PROPERTY
static final String GATEWAY_LICENSE_DIRECTORY_PROPERTY
static final String GATEWAY_LOG_DIRECTORY_PROPERTY
static final String GATEWAY_USER_LIB_DIRECTORY_PROPERTY
static final String BYPASS_PLATFORM_CHECK_PROPERTY
static final String LOG4J_CONFIG_PROPERTY
static final String OVERRIDE_LOGGING
true
. By
default the Gateway configures Log4J as the logging system, but any logging system that supports SLF4J (see
http://www.slf4j.org/ for more information) can be substituted.
static final String LOG4J_CONFIG_REFRESH_INTERVAL
static final String TCP_BACKLOG
static final String TCP_MAXIMUM_READ_BUFFER_SIZE
static final String TCP_MINIMUM_READ_BUFFER_SIZE
static final String TCP_NO_DELAY
static final String TCP_PROCESSOR_COUNT
static final String TCP_READ_BUFFER_SIZE
static final String TCP_WRITE_TIMEOUT
static final String UDP_MAXIMUM_READ_BUFFER_SIZE
static final String UDP_MINIMUM_READ_BUFFER_SIZE
static final String UDP_READ_BUFFER_SIZE
Method Detail |
---|
void setProperties(Properties properties)
GATEWAY_HOME
and
GATEWAY_CONFIG
. The gateway-config.xml configuration file also specifies property names and values that can be
overridden by the configured properties.
properties
- the name/value pairs used to configure the Gateway by setting the location of the GATEWAY_HOME, GATEWAY_CONFIG, etc.
and/or the names of properties in the gateway-config.xml and the values to which those properties should be set.Properties getProperties()
void setMBeanServer(MBeanServer server)
server
- the MBeanServer the Gateway should use to populate with its management information.void launch() throws Exception
Exception
- examples of exceptions thrown by the Gateway at launch time: unable to read the configuration file, unable to
bind to a network port specified in a service configuration, or a directory service's directory property is not
a valid directory.void destroy() throws Exception
Exception
- an example of exceptions thrown by the Gateway at destroy time is unable to clean up management information from
the MBeanServer, which could happen if the MBeanServer is destroyed out from underneath the Gateway unexpectedly.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |