Interface ITransportProvider
-
- All Known Implementing Classes:
JnrUnixSocketTransportProvider,TcpTransportProvider
public interface ITransportProviderInterface used byServiceLoaderto provide a transport used by DBus.- Since:
- v4.0.0 - 2021-09-05
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description java.lang.StringcreateDynamicSessionAddress(boolean _listeningSocket)Creates a new (dynamic) session for this transport.default AbstractTransportcreateTransport(BusAddress _address, int _timeout)Deprecated, for removal: This API element is subject to removal in a future version.just used for compatibility will be removed in the future.AbstractTransportcreateTransport(BusAddress _address, TransportConfig _config)Creates a new instance of this transport service using the given bus address.java.lang.StringgetSupportedBusType()Type of transport.java.lang.StringgetTransportName()Name of the transport implementation.
-
-
-
Method Detail
-
getTransportName
java.lang.String getTransportName()
Name of the transport implementation.- Returns:
- String, should not be null or empty
-
createTransport
AbstractTransport createTransport(BusAddress _address, TransportConfig _config) throws TransportConfigurationException
Creates a new instance of this transport service using the given bus address.If transport cannot be created because bus address type is not supported,
nullshould be returned. If initialization fails because of any other error, throw aTransportConfigurationException.- Parameters:
_address- bus address_config- configuration for this transport- Returns:
- transport instance or null
- Throws:
javax.xml.transform.TransformerConfigurationException- when configuring transport failsTransportConfigurationException
-
createTransport
@Deprecated(since="4.2.0 - 2022-07-21", forRemoval=true) default AbstractTransport createTransport(BusAddress _address, int _timeout) throws TransportConfigurationExceptionDeprecated, for removal: This API element is subject to removal in a future version.just used for compatibility will be removed in the future. Please usecreateTransport(BusAddress, TransportConfig).Creates a new instance of this transport service using the given bus address and timeout. This method is only implemented for compatibility to older transports. It will be removed in the future. Please usecreateTransport(BusAddress, TransportConfig)instead.- Parameters:
_address- bus address_timeout- timeout to use (if supported)- Returns:
- transport instance or null
- Throws:
javax.xml.transform.TransformerConfigurationException- when configuring transport failsTransportConfigurationException
-
getSupportedBusType
java.lang.String getSupportedBusType()
Type of transport. Should return an identifier for the supported socket type (e.g. UNIX for unix socket, TCP for tcp sockets).- Returns:
- String, never null
-
createDynamicSessionAddress
java.lang.String createDynamicSessionAddress(boolean _listeningSocket)
Creates a new (dynamic) session for this transport.- Parameters:
_listeningSocket- true when listening address should be created- Returns:
- String containing bus address
-
-