Class MethodCall


  • public class MethodCall
    extends Message
    • Constructor Detail

      • MethodCall

        public MethodCall​(java.lang.String dest,
                          java.lang.String path,
                          java.lang.String iface,
                          java.lang.String member,
                          byte flags,
                          java.lang.String sig,
                          java.lang.Object... args)
                   throws DBusException
        Throws:
        DBusException
      • MethodCall

        public MethodCall​(java.lang.String source,
                          java.lang.String dest,
                          java.lang.String path,
                          java.lang.String iface,
                          java.lang.String member,
                          byte flags,
                          java.lang.String sig,
                          java.lang.Object... args)
                   throws DBusException
        Throws:
        DBusException
    • Method Detail

      • setDefaultTimeout

        public static void setDefaultTimeout​(long timeout)
        Set the default timeout for method calls. Default is 20s.
        Parameters:
        timeout - New timeout in ms.
      • hasReply

        public boolean hasReply()
      • getReply

        public Message getReply​(long timeout)
        Block (if neccessary) for a reply.
        Parameters:
        timeout - The length of time to block before timing out (ms).
        Returns:
        The reply to this MethodCall, or null if a timeout happens.
      • getReply

        public Message getReply()
        Block (if neccessary) for a reply. Default timeout is 20s, or can be configured with setDefaultTimeout()
        Returns:
        The reply to this MethodCall, or null if a timeout happens.
      • setReply

        protected void setReply​(Message reply)