
org.freedesktop.dbus.spi.transport.ITransportProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbus-java-osgi Show documentation
Show all versions of dbus-java-osgi Show documentation
Improved version of the DBus-Java library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/).
This is the OSGi compliant bundle of all required libraries in one bundle.
package org.freedesktop.dbus.spi.transport;
import org.freedesktop.dbus.connections.BusAddress;
import org.freedesktop.dbus.connections.config.TransportConfig;
import org.freedesktop.dbus.connections.transports.AbstractTransport;
import org.freedesktop.dbus.exceptions.TransportConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
/**
* Interface used by {@link java.util.ServiceLoader ServiceLoader} to provide a transport used by DBus.
*
* @author hypfvieh
* @since v4.0.0 - 2021-09-05
*/
public interface ITransportProvider {
/**
* Name of the transport implementation.
* @return String, should not be null or empty
*/
String getTransportName();
/**
* 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, {@code null}
* should be returned. If initialization fails because of any other error, throw a {@link TransportConfigurationException}.
*
*
* @param _address bus address
* @param _config configuration for this transport
*
* @return transport instance or null
*
* @throws TransformerConfigurationException when configuring transport fails
*/
AbstractTransport createTransport(BusAddress _address, TransportConfig _config) throws TransportConfigurationException;
/**
* Type of transport.
* Should return an identifier for the supported socket type (e.g. UNIX for unix socket, TCP for tcp sockets).
*
* @return String, never null
*/
String getSupportedBusType();
/**
* Creates a new (dynamic) session for this transport.
*
* @param _listeningSocket true when listening address should be created
*
* @return String containing bus address
*/
String createDynamicSessionAddress(boolean _listeningSocket);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy