org.kde.koala
Class DCOPObjectProxy

java.lang.Object
  extended by org.kde.koala.DCOPObjectProxy
All Implemented Interfaces:
org.kde.qt.QtSupport
Direct Known Subclasses:
KDCOPActionProxy

public class DCOPObjectProxy
extends java.lang.Object
implements org.kde.qt.QtSupport

You must use a proxy if you want to dispatch method calls for object IDs which don't have (yet) a corresponding DCOPObject. This is somewhat like object references in CORBA.

Author:
Matthias Ettrich
See Also:
DCOPObject, DCOPClient

Constructor Summary
  DCOPObjectProxy()
          Creates a new proxy.
protected DCOPObjectProxy(java.lang.Class dummy)
           
 
Method Summary
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean process(java.lang.String arg1, java.lang.String fun, byte[] data, java.lang.StringBuffer replyType, byte[] replyData)
          Reimplement this method to dispatch method calls.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DCOPObjectProxy

protected DCOPObjectProxy(java.lang.Class dummy)

DCOPObjectProxy

public DCOPObjectProxy()
Creates a new proxy.

Method Detail

process

public boolean process(java.lang.String arg1,
                       java.lang.String fun,
                       byte[] data,
                       java.lang.StringBuffer replyType,
                       byte[] replyData)
Reimplement this method to dispatch method calls. This method is called of all proxies if the DCOPClient knows no object with the id obj. If the first proxy returns true, the DCOPClient will no longer call other proxies. The object id obj may be empty for app-wide function calls no associated with any object.

Parameters:
obj - the id of the object
fun - is the normalized function signature. Such a signature usually looks like foobar(String,int). The return type, qualifiers like "const" etc. are not part of the signature.
data - the received data
replyType - write the reply type in this string
replyData - write the reply data in this array
Returns:
true if successful, false otherwise. The default implementation returns always false.

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?