Class StandardInterfaceHandler

java.lang.Object
com.lucimber.dbus.connection.AbstractInboundHandler
com.lucimber.dbus.annotation.StandardInterfaceHandler
All Implemented Interfaces:
Handler, InboundHandler

public class StandardInterfaceHandler extends AbstractInboundHandler
Handler that implements standard D-Bus interfaces using reflection and annotations.

This handler automatically provides server-side implementations for:

  • org.freedesktop.DBus.Introspectable - generates XML from annotations
  • org.freedesktop.DBus.Properties - accesses annotated properties
  • org.freedesktop.DBus.Peer - standard implementation

Relationship to ServiceProxy:

  • StandardInterfaceHandler - Server-side handler for implementing D-Bus services
  • ServiceProxy - Client-side proxy for calling remote D-Bus services

Example usage:


 @DBusInterface("com.example.MyService")
 public class MyService {
     @DBusProperty
     private String version = "1.0.0";

     @DBusMethod
     public String echo(String message) {
         return message;
     }
 }

 // Register the handler
 MyService service = new MyService();
 StandardInterfaceHandler handler = new StandardInterfaceHandler(
     "/com/example/MyService", service);
 connection.getPipeline().addLast("standard", handler);