Package org.xlightweb

Examples of org.xlightweb.IHttpRequestHandler


 
  @Test
  public void testAuth() throws Exception {
      System.out.println("testAuth");
   
    IHttpRequestHandler auditFilter = new IHttpRequestHandler() {
     
      private Authenticator authenticator = new Authenticator();
     
      public void onRequest(final IHttpExchange exchange) throws IOException {
       
View Full Code Here


   
   
    @BeforeClass
    public static void setUp() throws Exception {
        IHttpRequestHandler hdl = new RequestHandler();
       
        proxyServer = new HttpServer(0, hdl);
        proxyServer.start();
       
        proxySslServer = new HttpServer(0, hdl, SSLTestContextFactory.getSSLContext(), true);
        proxySslServer.start();
       
       
        IHttpRequestHandler busiHdl = new BusinessRequestHandler();
        server = new HttpServer(0, busiHdl);
        server.start();
       
        sslServer = new HttpServer(0, busiHdl, SSLTestContextFactory.getSSLContext(), true);
        sslServer.start();
View Full Code Here

   

  @Test
  public void testETag() throws Exception {
     
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
               
                IHttpRequest request = exchange.getRequest();
                String ifNoneMatch = request.getHeader("If-None-Match");
View Full Code Here

 

    @Test
    public void testETagPost() throws Exception {
       
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
               
                IHttpRequest request = exchange.getRequest();
                String ifNoneMatch = request.getHeader("If-None-Match");
View Full Code Here

 

    @Test
    public void testETagInvalid() throws Exception {
       
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
               
                IHttpRequest request = exchange.getRequest();
                String ifNoneMatch = request.getHeader("If-None-Match");
View Full Code Here

   
    @Ignore
    @Test
    public void testETagInvalidPOSTRequest() throws Exception {
       
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
               
                IHttpRequest request = exchange.getRequest();
                String ifNoneMatch = request.getHeader("If-None-Match");
View Full Code Here

   
    @Ignore
    @Test
    public void testETagInvalidPOSTRequest2() throws Exception {
       
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {
           
            public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
               
                IHttpRequest request = exchange.getRequest();
                String ifNoneMatch = request.getHeader("If-None-Match");
View Full Code Here

   
   
    @Test
    public void testLastModification() throws Exception {
       
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {

            private final String date = HttpUtils.toRFC1123DateString(new Date());
           
            public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
               
View Full Code Here

   
   
    @Test
    public void testLastModificationInvalid() throws Exception {
       
        IHttpRequestHandler reqHdl = new IHttpRequestHandler() {

            private final String date = HttpUtils.toRFC1123DateString(new Date());
           
            public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
               
View Full Code Here

   
    @Test
    public void testManualContinue3() throws Exception {
       
       
        IHttpRequestHandler hdl = new IHttpRequestHandler() {
           
            @Supports100Continue
            public void onRequest(IHttpExchange exchange) throws IOException {
               
                exchange.send(new HttpResponse(100))// send continue
View Full Code Here

TOP

Related Classes of org.xlightweb.IHttpRequestHandler

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.