mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Extract static methods from Main
This commit is contained in:
parent
184354ffb7
commit
860ec6f5dc
8 changed files with 520 additions and 440 deletions
|
@ -0,0 +1,25 @@
|
|||
package org.asamk.signal;
|
||||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.freedesktop.dbus.DBusConnection;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceContent;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
|
||||
|
||||
class DbusReceiveMessageHandler extends ReceiveMessageHandler {
|
||||
|
||||
private final DBusConnection conn;
|
||||
private final String objectPath;
|
||||
|
||||
DbusReceiveMessageHandler(Manager m, DBusConnection conn, final String objectPath) {
|
||||
super(m);
|
||||
this.conn = conn;
|
||||
this.objectPath = objectPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(SignalServiceEnvelope envelope, SignalServiceContent content, Throwable exception) {
|
||||
super.handleMessage(envelope, content, exception);
|
||||
|
||||
JsonDbusReceiveMessageHandler.sendReceivedMessageToDbus(envelope, content, conn, objectPath, m);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue