|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.api.pipe.TransportTubeFactory
public abstract class TransportTubeFactory
Factory for transport tubes that enables transport pluggability.
At runtime, on the client side, JAX-WS (more specifically the default TubelineAssembler
of JAX-WS client runtime) relies on this factory to create a suitable transport Tube
that can handle the given endpoint address.
JAX-WS extensions that provide additional transport support can
extend this class and implement the doCreate(com.sun.xml.ws.api.pipe.ClientTubeAssemblerContext) method.
They are expected to check the scheme of the endpoint address
(and possibly some other settings from bindings), and create
their transport tube implementations accordingly.
For example,
class MyTransportTubeFactoryImpl {
Tube doCreate(...) {
String scheme = address.getURI().getScheme();
if(scheme.equals("foo"))
return new MyTransport(...);
else
return null;
}
}
TransportTubeFactory look-up follows the standard service
discovery mechanism, so you need
META-INF/services/com.sun.xml.ws.api.pipe.TransportTubeFactory.
StandaloneTubeAssembler| Constructor Summary | |
|---|---|
TransportTubeFactory()
|
|
| Method Summary | |
|---|---|
static Tube |
create(ClassLoader classLoader,
ClientTubeAssemblerContext context)
Locates TransportTubeFactorys and create a suitable transport Tube. |
protected Tube |
createDefault(ClientTubeAssemblerContext context)
|
protected Tube |
createHttpTransport(ClientTubeAssemblerContext context)
|
abstract Tube |
doCreate(ClientTubeAssemblerContext context)
Creates a transport Tube for the given port, if this factory can do so,
or return null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransportTubeFactory()
| Method Detail |
|---|
public abstract Tube doCreate(@NotNull
ClientTubeAssemblerContext context)
Tube for the given port, if this factory can do so,
or return null.
context - Object that captures various contextual information
that can be used to determine the tubeline to be assembled.
TransportTubeFactorys
that can. Or non-null.
WebServiceException - if this factory is capable of creating a transport tube but some fatal
error prevented it from doing so. This exception will be propagated
back to the user application, and no further TransportTubeFactorys
are consulted.
public static Tube create(@Nullable
ClassLoader classLoader,
@NotNull
ClientTubeAssemblerContext context)
TransportTubeFactorys and create a suitable transport Tube.
classLoader - used to locate META-INF/servces files.
Tube.protected Tube createDefault(ClientTubeAssemblerContext context)
protected Tube createHttpTransport(ClientTubeAssemblerContext context)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||