public interface UsbInfo {
String getDeviceID();
String getVendorID();
String getProductID();
// ...
}
public class UsbInfoImpl implements UsbInfo {
@Override
public String getDeviceID() {
// ...
}
@Override
public String getVendorID() {
// ...
}
@Override
public String getProductID() {
// ...
}
// ...
}
Bundle-SymbolicName: usbinfo
Export-Package: com.example.usbinfo
Service-Component: OSGI-INF/com.example.usbinfo.UsbInfoImpl.xml
<component name="com.example.usbinfo.UsbInfoImpl" instantiation="singleton">
<implementation class="com.example.usbinfo.impl.UsbInfoImpl"/>
<service>
<provide interface="com.example.usbinfo.UsbInfo"/>
</service>
</component>