org.kde.koala
Class KDCOPActionProxy

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

public class KDCOPActionProxy
extends DCOPObjectProxy

The KDCOPActionProxy class provides an easy way to publish a collection of KAction objects through DCOP. For the DCOP client the exported actions behave like full-fledged DCOP objects, providing full access to the KAction object functionality in the server. This class can generate DCOP object ids for given action objects, which it automatically processes, as being a DCOPObjectProxy .


Constructor Summary
protected KDCOPActionProxy(java.lang.Class dummy)
           
  KDCOPActionProxy(DCOPObjectInterface parent)
          Use this constructor if do not want to provide the exportable actions through a KActionCollection .
  KDCOPActionProxy(KActionCollection actionCollection, DCOPObjectInterface parent)
          Constructs a dcop action proxy, being able to export the actions of the provided KActionCollection through DCOP, using the parent DCOPObject's object id to generate unique object ids for the actions.
 
Method Summary
 KAction action(java.lang.String name)
          Returns an action object with the given name.
 java.lang.String actionObjectId(java.lang.String name)
          Use this method to retrieve a DCOP object id for an action with the given name.
 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)
          Internal reimplementation of DCOPObjectProxy.process .
 boolean processAction(java.lang.String arg1, java.lang.String fun, byte[] data, java.lang.StringBuffer replyType, byte[] replyData, KAction action)
          Called by the #process method and takes care of processing the object request for an action object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KDCOPActionProxy

protected KDCOPActionProxy(java.lang.Class dummy)

KDCOPActionProxy

public KDCOPActionProxy(KActionCollection actionCollection,
                        DCOPObjectInterface parent)
Constructs a dcop action proxy, being able to export the actions of the provided KActionCollection through DCOP, using the parent DCOPObject's object id to generate unique object ids for the actions.


KDCOPActionProxy

public KDCOPActionProxy(DCOPObjectInterface parent)
Use this constructor if do not want to provide the exportable actions through a KActionCollection . You have to reimplement the actions() and action() methods if you use this constructor.

Method Detail

action

public KAction action(java.lang.String name)
Returns an action object with the given name. The default implementation queries the action object from the KActionCollection, if the first constructor has been used.


actionObjectId

public java.lang.String actionObjectId(java.lang.String name)
Use this method to retrieve a DCOP object id for an action with the given name. This class automatically takes care of processing DCOP object requests for the returned object id. You can construct a global DCOP object referenence using DCOPRef. For example like DCOPRef( kapp.dcopClient().appId, actionProxy.actionObjectId( actionName ) ); The action with the given name has to be available through the #action method.


process

public boolean process(java.lang.String arg1,
                       java.lang.String fun,
                       byte[] data,
                       java.lang.StringBuffer replyType,
                       byte[] replyData)
Internal reimplementation of DCOPObjectProxy.process .

Overrides:
process in class DCOPObjectProxy
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.

processAction

public boolean processAction(java.lang.String arg1,
                             java.lang.String fun,
                             byte[] data,
                             java.lang.StringBuffer replyType,
                             byte[] replyData,
                             KAction action)
Called by the #process method and takes care of processing the object request for an action object.


finalize

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

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

dispose

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

Overrides:
dispose in class DCOPObjectProxy

isDisposed

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

Overrides:
isDisposed in class DCOPObjectProxy