Tomcat instead.@Deprecated public class Embedded extends StandardService
createEngine() to create an Engine object, and then
     call its property setters as desired.createHost() to create at least one virtual Host
     associated with the newly created Engine, and then call its property
     setters as desired.  After you customize this Host, add it to the
     corresponding Engine with engine.addChild(host).createContext() to create at least one Context
     associated with each newly created Host, and then call its property
     setters as desired.  You SHOULD create a Context with
     a pathname equal to a zero-length string, which will be used to process
     all requests not mapped to some other Context.  After you customize
     this Context, add it to the corresponding Host with
     host.addChild(context).addEngine() to attach this Engine to the set of
     defined Engines for this object.createConnector() to create at least one TCP/IP
     connector, and then call its property setters as desired.addConnector() to attach this Connector to the set
     of defined Connectors for this object.  The added Connector will use
     the most recently added Engine to process its received requests.start() to initiate normal operations of all the
     attached components.
 To initiate a normal shutdown, call the stop() method of
 this object.
 
For a complete example
 of how Tomcat is set up and launched as an Embedded application.Lifecycle.SingleUse| Modifier and Type | Field and Description | 
|---|---|
| protected HashMap<String,Authenticator> | authenticatorsDeprecated.  Custom mappings of login methods to authenticators | 
| protected boolean | awaitDeprecated.  Use await. | 
| protected Engine[] | enginesDeprecated.  The set of Engines that have been deployed in this server. | 
| protected static String | infoDeprecated.  Descriptive information about this server implementation. | 
| protected Realm | realmDeprecated.  The default realm to be used by all containers associated with
 this component. | 
| protected boolean | redirectStreamsDeprecated.  Is standard streams redirection enabled ? | 
| protected static StringManager | smDeprecated.  The string manager for this package. | 
| protected boolean | useNamingDeprecated.  Is naming enabled ? | 
connectors, container, executors, supportmserverAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description | 
|---|
| Embedded()Deprecated.  Construct a new instance of this class with default properties. | 
| Embedded(Realm realm)Deprecated.  Construct a new instance of this class with specified properties. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addAuthenticator(Authenticator authenticator,
                String loginMethod)Deprecated.  | 
| void | addConnector(Connector connector)Deprecated.  Add a new Connector to the set of defined Connectors. | 
| void | addEngine(Engine engine)Deprecated.  Add a new Engine to the set of defined Engines. | 
| Connector | createConnector(InetAddress address,
               int port,
               boolean secure)Deprecated.  Create, configure, and return a new TCP/IP socket connector
 based on the specified properties. | 
| Connector | createConnector(InetAddress address,
               int port,
               String protocol)Deprecated.  | 
| Connector | createConnector(String address,
               int port,
               boolean secure)Deprecated.  | 
| Connector | createConnector(String address,
               int port,
               String protocol)Deprecated.  | 
| Context | createContext(String path,
             String docBase)Deprecated.  Create, configure, and return a Context that will process all
 HTTP requests received from one of the associated Connectors,
 and directed to the specified context path on the virtual host
 to which this Context is connected. | 
| Engine | createEngine()Deprecated.  Create, configure, and return an Engine that will process all
 HTTP requests received from one of the associated Connectors,
 based on the specified properties. | 
| Host | createHost(String name,
          String appBase)Deprecated.  Create, configure, and return a Host that will process all
 HTTP requests received from one of the associated Connectors,
 and directed to the specified virtual host. | 
| Loader | createLoader(ClassLoader parent)Deprecated.  Create and return a class loader manager that can be customized, and
 then attached to a Context, before it is started. | 
| String | getCatalinaBase()Deprecated.  | 
| String | getCatalinaHome()Deprecated.  | 
| String | getInfo()Deprecated.  Return descriptive information about this Server implementation and
 the corresponding version number, in the format
  <description>/<version>. | 
| Realm | getRealm()Deprecated.  Return the default Realm for our Containers. | 
| protected void | initDirs()Deprecated.  | 
| protected void | initNaming()Deprecated.  Initialize naming - this should only enable java:env and root naming. | 
| protected void | initStreams()Deprecated.  | 
| boolean | isAwait()Deprecated.  | 
| boolean | isRedirectStreams()Deprecated.  Return true if redirection of standard streams is enabled. | 
| boolean | isUseNaming()Deprecated.  Return true if naming is enabled. | 
| void | removeContext(Context context)Deprecated.  Remove the specified Context from the set of defined Contexts for its
 associated Host. | 
| void | removeEngine(Engine engine)Deprecated.  Remove the specified Engine from the set of defined Engines, along with
 all of its related Hosts and Contexts. | 
| void | removeHost(Host host)Deprecated.  Remove the specified Host, along with all of its related Contexts,
 from the set of defined Hosts for its associated Engine. | 
| void | setAwait(boolean b)Deprecated.  | 
| void | setCatalinaBase(String s)Deprecated.  | 
| void | setCatalinaHome(String s)Deprecated.  | 
| void | setRealm(Realm realm)Deprecated.  Set the default Realm for our Containers. | 
| void | setRedirectStreams(boolean redirectStreams)Deprecated.  Enables or disables redirection. | 
| protected void | setSecurityProtection()Deprecated.  Set the security package access/protection. | 
| void | setUseNaming(boolean useNaming)Deprecated.  Enables or disables naming support. | 
| protected void | startInternal()Deprecated.  Start nested components ( Connectors andEngines) and
 implement the requirements ofLifecycleBase.startInternal(). | 
| protected void | stopInternal()Deprecated.  Stop nested components ( Connectors andEngines) and
 implement the requirements ofLifecycleBase.stopInternal(). | 
addExecutor, addPropertyChangeListener, destroyInternal, findConnectors, findExecutors, getConnectorNames, getContainer, getDomainInternal, getExecutor, getName, getObjectNameKeyProperties, getParentClassLoader, getServer, initInternal, removeConnector, removeExecutor, removePropertyChangeListener, setContainer, setName, setParentClassLoader, setServer, toStringgetDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregisteraddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stopprotected boolean useNaming
protected boolean redirectStreams
protected Engine[] engines
protected volatile HashMap<String,Authenticator> authenticators
protected static final String info
protected Realm realm
protected static final StringManager sm
protected boolean await
public Embedded()
public Embedded(Realm realm)
realm - Realm implementation to be inherited by all components
  (unless overridden further down the container hierarchy)public boolean isUseNaming()
public void setUseNaming(boolean useNaming)
useNaming - The new use naming valuepublic boolean isRedirectStreams()
public void setRedirectStreams(boolean redirectStreams)
redirectStreams - The new redirection valuepublic Realm getRealm()
public void setRealm(Realm realm)
realm - The new default realmpublic void setAwait(boolean b)
public boolean isAwait()
public void setCatalinaHome(String s)
public void setCatalinaBase(String s)
public String getCatalinaHome()
public String getCatalinaBase()
public void addConnector(Connector connector)
addConnector in interface ServiceaddConnector in class StandardServiceconnector - The connector to be addedIllegalStateException - if no engines have been added yetpublic void addEngine(Engine engine)
engine - The engine to be addedpublic Connector createConnector(InetAddress address, int port, boolean secure)
address - InetAddress to bind to, or null if the
 connector is supposed to bind to all addresses on this serverport - Port number to listen tosecure - true if the generated connector is supposed to be
 SSL-enabled, and false otherwisepublic Connector createConnector(String address, int port, boolean secure)
public Connector createConnector(InetAddress address, int port, String protocol)
public Connector createConnector(String address, int port, String protocol)
public Context createContext(String path, String docBase)
After you have customized the properties, listeners, and Valves for this Context, you must attach it to the corresponding Host by calling:
host.addChild(context);which will also cause the Context to be started if the Host has already been started.
path - Context path of this application ("" for the default
  application for this host, must start with a slash otherwise)docBase - Absolute pathname to the document base directory
  for this web applicationIllegalArgumentException - if an invalid parameter
  is specifiedpublic Engine createEngine()
public Host createHost(String name, String appBase)
After you have customized the properties, listeners, and Valves for this Host, you must attach it to the corresponding Engine by calling:
engine.addChild(host);which will also cause the Host to be started if the Engine has already been started. If this is the default (or only) Host you will be defining, you may also tell the Engine to pass all requests not assigned to another virtual host to this one:
engine.setDefaultHost(host.getName());
name - Canonical name of this virtual hostappBase - Absolute pathname to the application base directory
  for this virtual hostIllegalArgumentException - if an invalid parameter
  is specifiedpublic Loader createLoader(ClassLoader parent)
parent - ClassLoader that will be the parent of the one
  created by this Loaderpublic String getInfo()
<description>/<version>.getInfo in interface ServicegetInfo in class StandardService<description>/<version>.public void removeContext(Context context)
context - The Context to be removedpublic void removeEngine(Engine engine)
engine - The Engine to be removedpublic void removeHost(Host host)
host - The Host to be removedpublic void addAuthenticator(Authenticator authenticator, String loginMethod)
protected void startInternal()
                      throws LifecycleException
Connectors and Engines) and
 implement the requirements of
 LifecycleBase.startInternal().startInternal in class StandardServiceLifecycleException - if this component detects a fatal error
  that prevents this component from being usedprotected void stopInternal()
                     throws LifecycleException
Connectors and Engines) and
 implement the requirements of
 LifecycleBase.stopInternal().stopInternal in class StandardServiceLifecycleException - if this component detects a fatal error
  that needs to be reportedprotected void initNaming()
protected void initDirs()
protected void initStreams()
protected void setSecurityProtection()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.