Java 类javax.xml.ws.spi.http.HttpContext 实例源码

项目:jaxws-undertow-httpspi    文件:EndpointAPITest.java   
@Test
public void testMultiplePublishSameAddress() throws Exception
{
   server.start();
   String contextPath = "/ctxt";
   String path = "/echo";
   for (int i = 0; i < 3; i++)
   {
      HttpContext ctx = UndertowContextFactory.createHttpContext(server, contextPath, path);
      String address = "http://localhost:" + currentPort + contextPath + path;

      Endpoint endpoint = Endpoint.create(new EndpointBean());
      endpoint.publish(ctx); // Use httpserver context for publishing

      invokeEndpoint(address);

      endpoint.stop();
   }
}
项目:jaxws-undertow-httpspi    文件:EndpointAPITest.java   
@Test
public void testMultipleEndpointsSameContext() throws Exception
{
   server.start();
   String contextPath = "/ctxt";
   String path = "/echo";
   int k = 3;
   Endpoint[] endpoints = new Endpoint[k];
   HttpContext[] contexts = new HttpContext[k];
   String[] addresses = new String[k];
   for (int i = 0; i < k; i++)
   {
      addresses[i] = "http://localhost:" + currentPort + contextPath + path + i;
      contexts[i] = UndertowContextFactory.createHttpContext(server, contextPath, path + i);
      endpoints[i] = Endpoint.create(new EndpointBean());
      endpoints[i].publish(contexts[i]);
   }
   for (int i = 0; i < k; i++)
   {
      invokeEndpoint(addresses[i]);
   }
   for (int i = 0; i < k; i++)
   {
      endpoints[i].stop();
   }
}
项目:jaxws-undertow-httpspi    文件:EndpointAPITest.java   
@Test
public void testMultipleEndpointsDifferentContexts() throws Exception
{
   server.start();
   String contextPath = "/ctxt";
   String path = "/echo";
   int k = 3;
   Endpoint[] endpoints = new Endpoint[k];
   HttpContext[] contexts = new HttpContext[k];
   String[] addresses = new String[k];
   for (int i = 0; i < k; i++)
   {
      addresses[i] = "http://localhost:" + currentPort + contextPath + i + path;
      contexts[i] = UndertowContextFactory.createHttpContext(server, contextPath + i, path);
      endpoints[i] = Endpoint.create(new EndpointBean());
      endpoints[i].publish(contexts[i]);
   }
   for (int i = 0; i < k; i++)
   {
      invokeEndpoint(addresses[i]);
   }
   for (int i = 0; i < k; i++)
   {
      endpoints[i].stop();
   }
}
项目:OpenJSharp    文件:EndpointImpl.java   
public void publish(Object serverContext) {
    canPublish();
    if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
        throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
    }
    createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:openjdk-jdk10    文件:EndpointImpl.java   
@Override
public void publish(Object serverContext) {
    canPublish();
    if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
        throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
    }
    createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:openjdk9    文件:EndpointImpl.java   
public void publish(Object serverContext) {
    canPublish();
    if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
        throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
    }
    createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:lookaside_java-1.8.0-openjdk    文件:EndpointImpl.java   
public void publish(Object serverContext) {
    canPublish();
    if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
        throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
    }
    createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:jaxws-undertow-httpspi    文件:UndertowHttpExchange.java   
@Override
public HttpContext getHttpContext()
{
   if (context == null)
   {
      context = new UndertowHttpContext(new PathHandler(), PathUtils.getContextPathFromRequest(undertowExchange.getRequestPath()),
            PathUtils.getPathFromRequest(undertowExchange.getRequestPath()));
   }
   return context;
}
项目:infobip-open-jdk-8    文件:EndpointImpl.java   
public void publish(Object serverContext) {
    canPublish();
    if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
        throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
    }
    createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:OLD-OpenJDK8    文件:EndpointImpl.java   
public void publish(Object serverContext) {
    canPublish();
    if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
        throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
    }
    createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:openjdk-icedtea7    文件:EndpointImpl.java   
public void publish(Object serverContext) {
    canPublish();
    if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
        throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
    }
    createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:OpenJSharp    文件:EndpointImpl.java   
public void publish(HttpContext serverContext) {
    canPublish();
    createEndpoint(serverContext.getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:openjdk-jdk10    文件:EndpointImpl.java   
@Override
public void publish(HttpContext serverContext) {
    canPublish();
    createEndpoint(serverContext.getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:openjdk9    文件:EndpointImpl.java   
public void publish(HttpContext serverContext) {
    canPublish();
    createEndpoint(serverContext.getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:lookaside_java-1.8.0-openjdk    文件:EndpointImpl.java   
public void publish(HttpContext serverContext) {
    canPublish();
    createEndpoint(serverContext.getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:jaxws-undertow-httpspi    文件:UndertowContextFactory.java   
public static HttpContext createHttpContext(UndertowServer server, String contextPath, String path)
{
  return new UndertowHttpContext(server.getPathHandler(), contextPath, path); 
}
项目:jaxws-undertow-httpspi    文件:EndpointAPITest.java   
@Test
public void testSingleEndpoint() throws Exception
{

   String contextPath = "/ctxt";
   String path = "/echo";
   String address = "http://localhost:" + currentPort + contextPath + path;

   HttpContext context = UndertowContextFactory.createHttpContext(server, contextPath, path);

   Endpoint endpoint = Endpoint.create(new EndpointBean());
   endpoint.publish(context); // Use httpserver context for publishing

   server.start();

   invokeEndpoint(address);

   endpoint.stop();
}
项目:infobip-open-jdk-8    文件:EndpointImpl.java   
public void publish(HttpContext serverContext) {
    canPublish();
    createEndpoint(serverContext.getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:OLD-OpenJDK8    文件:EndpointImpl.java   
public void publish(HttpContext serverContext) {
    canPublish();
    createEndpoint(serverContext.getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:openjdk-icedtea7    文件:EndpointImpl.java   
public void publish(HttpContext serverContext) {
    canPublish();
    createEndpoint(serverContext.getPath());
    ((HttpEndpoint) actualEndpoint).publish(serverContext);
}
项目:OpenJSharp    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a <code>java.lang.SecurityManger</code>
 *          is being used and the application doesn't have the
 *          <code>WebServicePermission("publishEndpoint")</code> permission.
 * @since JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
项目:openjdk-jdk10    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a {@code java.lang.SecurityManger}
 *          is being used and the application doesn't have the
 *          {@code WebServicePermission("publishEndpoint")} permission.
 * @since 1.7, JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
项目:openjdk9    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a {@code java.lang.SecurityManger}
 *          is being used and the application doesn't have the
 *          {@code WebServicePermission("publishEndpoint")} permission.
 * @since 1.7, JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
项目:Java8CN    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a <code>java.lang.SecurityManger</code>
 *          is being used and the application doesn't have the
 *          <code>WebServicePermission("publishEndpoint")</code> permission.
 * @since JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
项目:lookaside_java-1.8.0-openjdk    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a <code>java.lang.SecurityManger</code>
 *          is being used and the application doesn't have the
 *          <code>WebServicePermission("publishEndpoint")</code> permission.
 * @since JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
项目:infobip-open-jdk-8    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a <code>java.lang.SecurityManger</code>
 *          is being used and the application doesn't have the
 *          <code>WebServicePermission("publishEndpoint")</code> permission.
 * @since JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
项目:OLD-OpenJDK8    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a <code>java.lang.SecurityManger</code>
 *          is being used and the application doesn't have the
 *          <code>WebServicePermission("publishEndpoint")</code> permission.
 * @since JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}
项目:openjdk-icedtea7    文件:Endpoint.java   
/**
 * Publishes this endpoint at the provided server context.
 * A server context encapsulates the server infrastructure
 * and addressing information for a particular transport.
 * For a call to this method to succeed, the server context
 * passed as an argument to it MUST be compatible with the
 * endpoint's binding.
 *
 * <p>
 * This is meant for container developers to publish the
 * the endpoints portably and not intended for the end
 * developers.
 *
 *
 * @param serverContext An object representing a server
 *           context to be used for publishing the endpoint.
 *
 * @throws java.lang.IllegalArgumentException
 *              If the provided server context is not
 *              supported by the implementation or turns
 *              out to be unusable in conjunction with the
 *              endpoint's binding.
 *
 * @throws java.lang.IllegalStateException
 *         If the endpoint has been published already or it has been stopped.
 *
 * @throws java.lang.SecurityException
 *          If a <code>java.lang.SecurityManger</code>
 *          is being used and the application doesn't have the
 *          <code>WebServicePermission("publishEndpoint")</code> permission.
 * @since JAX-WS 2.2
 */
public void publish(HttpContext serverContext) {
    throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
}