< prev index next >

src/java.xml.ws/share/classes/javax/xml/ws/spi/http/HttpContext.java

Print this page


   1 /*
   2  * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  24  */
  25 
  26 package javax.xml.ws.spi.http;
  27 
  28 import javax.xml.ws.Endpoint;
  29 import java.util.Set;
  30 
  31 /**
  32  * HttpContext represents a mapping between the root URI path of a web
  33  * service to a {@link HttpHandler} which is invoked to handle requests
  34  * destined for that path on the associated container.
  35  * <p>
  36  * Container provides the implementation for this and it matches
  37  * web service requests to corresponding HttpContext objects.
  38  *
  39  * @author Jitendra Kotamraju
  40  * @since 1.7, JAX-WS 2.2
  41  */
  42 public abstract class HttpContext {
  43 



  44     protected HttpHandler handler;
  45 
  46     /**
  47      * JAX-WS runtime sets its handler during
  48      * {@link Endpoint#publish(HttpContext)} to handle
  49      * HTTP requests for this context. Container or its extensions
  50      * use this handler to process the requests.
  51      *
  52      * @param handler the handler to set for this context
  53      */
  54     public void setHandler(HttpHandler handler) {
  55         this.handler = handler;
  56     }
  57 
  58     /**
  59      * Returns the path for this context. This path uniquely identifies
  60      * an endpoint inside an application and the path is relative to
  61      * application's context path. Container should give this
  62      * path based on how it matches request URIs to this HttpContext object.
  63      *


   1 /*
   2  * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  24  */
  25 
  26 package javax.xml.ws.spi.http;
  27 
  28 import javax.xml.ws.Endpoint;
  29 import java.util.Set;
  30 
  31 /**
  32  * HttpContext represents a mapping between the root URI path of a web
  33  * service to a {@link HttpHandler} which is invoked to handle requests
  34  * destined for that path on the associated container.
  35  * <p>
  36  * Container provides the implementation for this and it matches
  37  * web service requests to corresponding HttpContext objects.
  38  *
  39  * @author Jitendra Kotamraju
  40  * @since 1.7, JAX-WS 2.2
  41  */
  42 public abstract class HttpContext {
  43 
  44     /**
  45      * The handler to set for this context.
  46      */
  47     protected HttpHandler handler;
  48 
  49     /**
  50      * JAX-WS runtime sets its handler during
  51      * {@link Endpoint#publish(HttpContext)} to handle
  52      * HTTP requests for this context. Container or its extensions
  53      * use this handler to process the requests.
  54      *
  55      * @param handler the handler to set for this context
  56      */
  57     public void setHandler(HttpHandler handler) {
  58         this.handler = handler;
  59     }
  60 
  61     /**
  62      * Returns the path for this context. This path uniquely identifies
  63      * an endpoint inside an application and the path is relative to
  64      * application's context path. Container should give this
  65      * path based on how it matches request URIs to this HttpContext object.
  66      *


< prev index next >