com.sun.xml.internal.ws.transport.http.HttpAdapter Java Examples

The following examples show how to use com.sun.xml.internal.ws.transport.http.HttpAdapter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EndpointImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #2
Source File: EndpointImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #3
Source File: EndpointImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #4
Source File: EndpointImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #5
Source File: EndpointImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #6
Source File: EndpointImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #7
Source File: EndpointImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #8
Source File: EndpointImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
    HttpAdapterList adapterList = null;
    if (endpointContext != null) {
            if (endpointContext instanceof Component) {
                    adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
            }

            if (adapterList == null) {
                for(Endpoint e : endpointContext.getEndpoints()) {
                    if (e.isPublished() && e != this) {
                        adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
                        assert adapterList != null;
                        break;
                    }
                }
            }
    }
    if (adapterList == null) {
        adapterList = new ServerAdapterList();
    }
    return adapterList.createAdapter("", urlPattern, endpoint);
}
 
Example #9
Source File: HttpTransportPipe.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #10
Source File: HttpTransportPipe.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #11
Source File: HttpTransportPipe.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #12
Source File: HttpTransportPipe.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #13
Source File: HttpTransportPipe.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #14
Source File: HttpTransportPipe.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #15
Source File: HttpTransportPipe.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #16
Source File: HttpTransportPipe.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintWriter pw = new PrintWriter(baos, true);
    pw.println("---["+caption +"]---");
    for (Entry<String,List<String>> header : headers.entrySet()) {
        if(header.getValue().isEmpty()) {
            // I don't think this is legal, but let's just dump it,
            // as the point of the dump is to uncover problems.
            pw.println(header.getValue());
        } else {
            for (String value : header.getValue()) {
                pw.println(header.getKey()+": "+value);
            }
        }
    }

    if (buf.size() > HttpAdapter.dump_threshold) {
        byte[] b = buf.getRawData();
        baos.write(b, 0, HttpAdapter.dump_threshold);
        pw.println();
        pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
    } else {
        buf.writeTo(baos);
    }
    pw.println("--------------------");

    String msg = baos.toString();
    if (dump) {
        System.out.println(msg);
    }
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.log(Level.FINER, msg);
    }
}
 
Example #17
Source File: ServerConnectionImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public ServerConnectionImpl(@NotNull HttpAdapter adapter, @NotNull HttpExchange httpExchange) {
    this.adapter = adapter;
    this.httpExchange = httpExchange;
}
 
Example #18
Source File: ServerConnectionImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public ServerConnectionImpl(@NotNull HttpAdapter adapter, @NotNull HttpExchange httpExchange) {
    this.adapter = adapter;
    this.httpExchange = httpExchange;
}
 
Example #19
Source File: HttpEndpoint.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public HttpEndpoint(Executor executor, HttpAdapter adapter) {
    this.executor = executor;
    this.adapter = adapter;
}
 
Example #20
Source File: PortableConnectionImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public PortableConnectionImpl(@NotNull HttpAdapter adapter, @NotNull HttpExchange httpExchange) {
    this.adapter = adapter;
    this.httpExchange = httpExchange;
}
 
Example #21
Source File: WSHttpHandler.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public WSHttpHandler(@NotNull HttpAdapter adapter, @Nullable Executor executor) {
    assert adapter!=null;
    this.adapter = adapter;
    this.executor = executor;
}
 
Example #22
Source File: PortableHttpHandler.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public PortableHttpHandler(@NotNull HttpAdapter adapter, @Nullable Executor executor) {
    assert adapter!=null;
    this.adapter = adapter;
    this.executor = executor;
}
 
Example #23
Source File: MonitorRootService.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@ManagedAttribute
@Description("Show what goes across HTTP transport")
public void dumpHTTPMessages(final boolean x) { HttpAdapter.setDump(x); }
 
Example #24
Source File: MonitorRootService.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@ManagedAttribute
@Description("If true: show what goes across HTTP transport")
public boolean dumpHTTPMessages() { return HttpAdapter.dump; }
 
Example #25
Source File: PortableHttpHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public PortableHttpHandler(@NotNull HttpAdapter adapter, @Nullable Executor executor) {
    assert adapter!=null;
    this.adapter = adapter;
    this.executor = executor;
}
 
Example #26
Source File: WSHttpHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public WSHttpHandler(@NotNull HttpAdapter adapter, @Nullable Executor executor) {
    assert adapter!=null;
    this.adapter = adapter;
    this.executor = executor;
}
 
Example #27
Source File: HttpEndpoint.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public HttpEndpoint(Executor executor, HttpAdapter adapter) {
    this.executor = executor;
    this.adapter = adapter;
}
 
Example #28
Source File: ServerConnectionImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public ServerConnectionImpl(@NotNull HttpAdapter adapter, @NotNull HttpExchange httpExchange) {
    this.adapter = adapter;
    this.httpExchange = httpExchange;
}
 
Example #29
Source File: MonitorRootService.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@ManagedAttribute
@Description("If true: show what goes across HTTP transport")
public boolean dumpHTTPMessages() { return HttpAdapter.dump; }
 
Example #30
Source File: HttpEndpoint.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public HttpEndpoint(Executor executor, HttpAdapter adapter) {
    this.executor = executor;
    this.adapter = adapter;
}