public abstract class TransportFactory extends Object
Constructor and Description |
---|
TransportFactory() |
Modifier and Type | Method and Description |
---|---|
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() |
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 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 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–2016 The Apache Software Foundation. All rights reserved.