public abstract class TransportFactory extends Object
| Constructor and Description |
|---|
TransportFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected TransportOptions |
applyTransportConfiguration(TransportOptions transportOptions,
Map<String,String> transportURIOptions)
Apply URI options to a freshly created
TransportOptions instance which will be used
when the actual Transport is created. |
static Transport |
create(String transportKey,
URI remoteURI)
Static create method that performs the TransportFactory search and handles the
configuration and setup.
|
Transport |
createTransport(URI remoteURI)
Creates an instance of the given Transport and configures it using the
properties set on the given remote broker URI.
|
protected abstract Transport |
doCreateTransport(URI remoteURI,
TransportOptions transportOptions)
Create the actual Transport instance for this factory using the provided URI and
TransportOptions instances.
|
protected TransportOptions |
doCreateTransportOptions()
Create and return an instance of TransportOptions appropriate for the Transport
type that this factory will return.
|
static TransportFactory |
findTransportFactory(String transportKey)
Searches for a TransportFactory by using the scheme from the given key.
|
abstract String |
getName() |
boolean |
isSecure() |
public Transport createTransport(URI remoteURI) throws Exception
remoteURI - The URI used to connect to a remote Peer.Exception - if an error occurs while creating the Transport instance.protected TransportOptions doCreateTransportOptions()
protected TransportOptions applyTransportConfiguration(TransportOptions transportOptions, Map<String,String> transportURIOptions)
TransportOptions instance which will be used
when the actual Transport is created.transportOptions - The TransportOptions instance to configure.transportURIOptions - The URI options to apply to the given TransportOptions.protected abstract Transport doCreateTransport(URI remoteURI, TransportOptions transportOptions) throws Exception
remoteURI - The URI used to connect to a remote Peer.transportOptions - The TransportOptions used to configure the new Transport.Exception - if an error occurs while creating the Transport instance.public abstract String getName()
public boolean isSecure()
public static Transport create(String transportKey, URI remoteURI) throws Exception
transportKey - The transport type name used to locate a TransportFactory.remoteURI - the URI of the remote peer.Exception - if an error occurs while creating the Transport instance.public static TransportFactory findTransportFactory(String transportKey) throws IOException
transportKey - The transport type name used to locate a TransportFactory.IOException - if an error occurs while locating the factory.Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.