src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -27,14 +27,14 @@
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.Nullable;
import com.sun.xml.internal.ws.api.EndpointAddress;
import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.api.server.Container;
import com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe;
import com.sun.xml.internal.ws.util.ServiceFinder;
import com.sun.xml.internal.ws.util.pipe.StandaloneTubeAssembler;
+import java.util.logging.Level;
import javax.xml.ws.WebServiceException;
import java.util.logging.Logger;
/**
@@ -66,11 +66,11 @@
* </pre>
*
* <p>
* {@link TransportTubeFactory} look-up follows the standard service
* discovery mechanism, so you need
- * {@code META-INF/services/com.sun.xml.internal.ws.api.pipe.TransportTubeFactory}.
+ * {@code META-INF/services/com.sun.xml.internal.ws.api.pipe.BasicTransportTubeFactory}.
*
* @author Jitendra Kotamraju
* @see StandaloneTubeAssembler
*/
public abstract class TransportTubeFactory {
@@ -114,12 +114,14 @@
* Always non-null, since we fall back to our default {@link Tube}.
*/
public static Tube create(@Nullable ClassLoader classLoader, @NotNull ClientTubeAssemblerContext context) {
for (TransportTubeFactory factory : ServiceFinder.find(TransportTubeFactory.class,classLoader, context.getContainer())) {
Tube tube = factory.doCreate(context);
- if(tube !=null) {
- TransportTubeFactory.logger.fine(factory.getClass()+" successfully created "+tube);
+ if (tube !=null) {
+ if (logger.isLoggable(Level.FINE)) {
+ TransportTubeFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), tube});
+ }
return tube;
}
}
// See if there is a {@link TransportPipeFactory} out there and use it for compatibility.
@@ -128,11 +130,13 @@
context.getBinding(), context.getContainer());
ctxt.setCodec(context.getCodec());
for (TransportPipeFactory factory : ServiceFinder.find(TransportPipeFactory.class,classLoader)) {
Pipe pipe = factory.doCreate(ctxt);
if (pipe!=null) {
- logger.fine(factory.getClass()+" successfully created "+pipe);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), pipe});
+ }
return PipeAdapter.adapt(pipe);
}
}
return DEFAULT.createDefault(ctxt);