org.freedesktop.dbus
Class MethodCall

java.lang.Object
  extended by org.freedesktop.dbus.Message
      extended by org.freedesktop.dbus.MethodCall

public class MethodCall
extends Message


Nested Class Summary
 
Nested classes/interfaces inherited from class org.freedesktop.dbus.Message
Message.ArgumentType, Message.Endian, Message.Flags, Message.HeaderField, Message.MessageType
 
Field Summary
 
Fields inherited from class org.freedesktop.dbus.Message
bytecounter, flags, globalserial, headers, PROTOCOL, protover, serial, type, wiredata
 
Constructor Summary
MethodCall(String dest, String path, String iface, String member, byte flags, String sig, Object... args)
           
MethodCall(String source, String dest, String path, String iface, String member, byte flags, String sig, Object... args)
           
 
Method Summary
 Message getReply()
          Block (if neccessary) for a reply.
 Message getReply(long timeout)
          Block (if neccessary) for a reply.
 boolean hasReply()
           
static void setDefaultTimeout(long timeout)
          Set the default timeout for method calls.
protected  void setReply(Message reply)
           
 
Methods inherited from class org.freedesktop.dbus.Message
align, append, appendByte, appendBytes, appendint, demarshallint, demarshallint, demarshallintBig, demarshallintLittle, extract, extract, getAlignment, getDestination, getFlags, getHeader, getHeaderFieldName, getInterface, getName, getParameters, getPath, getReplySerial, getSerial, getSig, getSource, getWireData, marshallint, marshallintBig, marshallintLittle, pad, setArgs, setSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodCall

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

MethodCall

public MethodCall(String source,
                  String dest,
                  String path,
                  String iface,
                  String member,
                  byte flags,
                  String sig,
                  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)