Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
D-Bus Java Implementation
Copyright (c) 2005-2006 Matthew Johnson
Copyright (c) 2017-2019 David M.
This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 2 or the
Academic Free Licence Version 2.1.
Full licence texts are included in the LICENSE file with this program.
*/
package org.freedesktop.dbus.errors;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.List;
import org.freedesktop.dbus.connections.AbstractConnection;
import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.exceptions.DBusExecutionException;
import org.freedesktop.dbus.exceptions.MessageFormatException;
import org.freedesktop.dbus.exceptions.NotConnected;
import org.freedesktop.dbus.messages.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Error messages which can be sent over the bus.
*/
public class Error extends Message {
private final Logger logger = LoggerFactory.getLogger(getClass());
public Error() {
}
public Error(String dest, String errorName, long replyserial, String sig, Object... args) throws DBusException {
this(null, dest, errorName, replyserial, sig, args);
}
public Error(String source, String dest, String errorName, long replyserial, String sig, Object... args)
throws DBusException {
super(DBusConnection.getEndianness(), Message.MessageType.ERROR, (byte) 0);
if (null == errorName) {
throw new MessageFormatException("Must specify error name to Errors.");
}
getHeaders().put(Message.HeaderField.REPLY_SERIAL, replyserial);
getHeaders().put(Message.HeaderField.ERROR_NAME, errorName);
List