Package net.sourceforge.javautil.web.server

Examples of net.sourceforge.javautil.web.server.WebServerException


    this.connectors.put(connector.getName(), connector);
  }

  public MockServerHost createHost(String name, String basePath, boolean defaultHost) throws WebServerException {
    if (this.hosts.containsKey(name))
      throw new WebServerException(this, "There is already a host with this name: " + name);

    MockServerHost host = new MockServerHost(this, defaultHost, name, basePath);
    this.hosts.put(name, host);
    if (host.isDefault()) this.defaultHost = host;
    return host;
View Full Code Here


  public boolean stop() { this.handler.serverStopped(new WebServerEvent(this)); return true; }
 
  @Override public void removeHost(String name) {
    if (!this.hosts.containsKey(name))
      throw new WebServerException(this, "No such host: " + name);
   
    ((MockServerHost)hosts.get(name)).destroy();
    super.removeHost(name);
  }
View Full Code Here

  public boolean handlesHost(String host) { return this.aliases.contains(host); }
 
  public boolean deploy(WebApplication application) {
    if (this.deployed.containsKey(name))
      throw new WebServerException(server, "An application is already deployed by this name: " + name);
   
    try {
      MockHttpServletContext context = new MockHttpServletContext(this, application);
      WebApplicationDeploymentContext deployment = new WebApplicationDeploymentContext(this, application, context);
      application.preDeploySetup(deployment, false);
View Full Code Here

    return this.basePath;
  }

  public boolean undeploy(String name) {
    if (!this.deployed.containsKey(name))
      throw new WebServerException(server, "No such application to undeploy: " + name);
   
    try {
      ((MockHttpServletContext)deployed.get(name).getServletContext()).destroyed();
      deployed.get(name).getApplication().postUndeployCleanup(deployed.get(name), false);
      server.getHandler().applicationUndeployed(new WebServerApplicationEvent(server, this, deployed.get(name).getApplication()));
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.web.server.WebServerException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.