Package org.tamacat.httpd.config

Examples of org.tamacat.httpd.config.ServerConfig


    + "response=\"97d955134af5546163075400e4727431\", "
    + "qop=auth, nc=00000001, cnonce=\"8a59d880636c718a\"";
 
  @Before
  public void setUp() throws Exception {
    config = new ServerConfig();
    ServiceUrl serviceUrl = new ServiceUrl(config);

    auth = new DigestAuthProcessor();
    auth.init(serviceUrl);
   
View Full Code Here


  private SingleSignOnFilter filter;
 
  @Before
  public void setUp() throws Exception {
    filter = new SingleSignOnFilter();
    ServerConfig config = new ServerConfig();
    ServiceUrl serviceUrl = new ServiceUrl(config);
    filter.init(serviceUrl);
  }
View Full Code Here

    response = HttpObjectFactory.createHttpResponse(200, "OK");
    context = HttpObjectFactory.createHttpContext();
    InetAddress address = InetAddress.getByName("127.0.0.1");
    context.setAttribute(RequestUtils.REMOTE_ADDRESS, address);
    context.setAttribute(AuthComponent.REMOTE_USER_KEY, "admin");
    ServerConfig config = new ServerConfig();
    serviceUrl = new ServiceUrl(config);
    filter.init(serviceUrl);
  }
View Full Code Here

public class SSLContextCreatorTest {
 
  @Test
  public void testSSLContextCreatorServerConfig() throws Exception {
    ServerConfig config = new ServerConfig(new Properties());
    config.setParam("https.keyStoreFile", "test.keystore");
    config.setParam("https.keyPassword", "nopassword");
    config.setParam("https.keyStoreType", "JKS");
    config.setParam("https.protocol", "SSLv3");
   
    SSLContextCreator creator = new SSLContextCreator(config);
    SSLContext ctx = creator.getSSLContext();
    assertNotNull(ctx);
  }
View Full Code Here

    request.setHeader(HTTP.TARGET_HOST, "example.com");
    url = RequestUtils.getRequestURL(request, null);
    assertEquals("http://example.com/test.html", url.toString());
   
    ServerConfig serverConfig = new ServerConfig();
    serverConfig.setParam("Port", "8080");
    ServiceUrl serviceUrl = new ServiceUrl(serverConfig);
    url = RequestUtils.getRequestURL(request, null, serviceUrl);
    assertEquals("http://example.com:8080/test.html", url.toString());
   
    serverConfig = new ServerConfig();
    serverConfig.setParam("Port", "443");
    serverConfig.setParam("https", "true");
    serviceUrl = new ServiceUrl(serverConfig);
    url = RequestUtils.getRequestURL(request, null, serviceUrl);
    assertEquals("https://example.com/test.html", url.toString());
  }
View Full Code Here

    request.setHeader(HTTP.TARGET_HOST, "example.com");
    url = RequestUtils.getRequestHostURL(request, null, null);
    assertEquals("http://example.com", url);
   
    ServerConfig serverConfig = new ServerConfig();
    serverConfig.setParam("Port", "8080");
    ServiceUrl serviceUrl = new ServiceUrl(serverConfig);
    url = RequestUtils.getRequestHostURL(request, null, serviceUrl);
    assertEquals("http://example.com:8080", url.toString());
   
    serverConfig = new ServerConfig();
    serverConfig.setParam("Port", "443");
    serverConfig.setParam("https", "true");
    serviceUrl = new ServiceUrl(serverConfig);
    url = RequestUtils.getRequestHostURL(request, null, serviceUrl);
    assertEquals("https://example.com", url.toString());   
  }
View Full Code Here

  ServerConfig serverConfig;
 
  @Before
  public void setUp() throws Exception {
    serverConfig = new ServerConfig();
  }
View Full Code Here

   
  }

  @Test
  public void testCreateSecureServerSocket() throws IOException {
    ServerConfig serverConfig = new ServerConfig(PropertyUtils.getProperties("server.properties"));
    engine.setServerConfig(serverConfig);
    //ServerSocket socket = engine.createSecureServerSocket(8080);
    //socket.close();
   
    SSLContextCreator sslContextCreator = new SSLContextCreator(serverConfig);
View Full Code Here

    //engine.reload();
  }

  @Test
  public void testGetMaxServerThreads() {
    ServerConfig serverConfig = new ServerConfig(PropertyUtils.getProperties("server.properties"));
    engine.setServerConfig(serverConfig);
    engine.setMaxServerThreads(3);
    assertEquals(3, engine.getMaxServerThreads());
  }
View Full Code Here

    assertEquals("server.properties", engine.getPropertiesName());
  }

  @Test
  public void testGetServerConfig() {
    ServerConfig serverConfig = new ServerConfig(PropertyUtils.getProperties("server.properties"));
    engine.setServerConfig(serverConfig);
    assertSame(serverConfig, engine.getServerConfig());
  }
View Full Code Here

TOP

Related Classes of org.tamacat.httpd.config.ServerConfig

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.