org.kde.koala
Class KDCOPServiceStarter
java.lang.Object
org.kde.koala.KDCOPServiceStarter
- All Implemented Interfaces:
- org.kde.qt.QtSupport
public class KDCOPServiceStarter
- extends java.lang.Object
- implements org.kde.qt.QtSupport
A generic DCOP service starter, using KTrader.
The default implementation starts new processes, but this interface can
also be reimplemented by specific applications to provide dlopened in-process DCOP objects.
- Author:
- David Faure
Method Summary |
int |
findServiceFor(java.lang.String serviceType)
|
int |
findServiceFor(java.lang.String serviceType,
java.lang.String constraint)
|
int |
findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences)
|
int |
findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error)
|
int |
findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService)
|
int |
findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService,
int flags)
Check if a given DCOP interface is available - from the serviceType it's supposed to implement. |
static KDCOPServiceStarter |
self()
|
int |
startServiceFor(java.lang.String serviceType)
|
int |
startServiceFor(java.lang.String serviceType,
java.lang.String constraint)
|
int |
startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences)
|
int |
startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error)
|
int |
startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService)
|
int |
startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService,
int flags)
Find an implementation of the given serviceType ,
and start it, to use its DCOP interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KDCOPServiceStarter
protected KDCOPServiceStarter(java.lang.Class dummy)
KDCOPServiceStarter
public KDCOPServiceStarter()
findServiceFor
public int findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService,
int flags)
- Check if a given DCOP interface is available - from the serviceType it's supposed to implement.
The trader is queried to find the preferred application for this serviceType,
with the constraint that its X-DCOP-ServiceName property must be defined.
Then the DCOP server is checked. If the service is not available,
this method will call startServiceFor to start it.
- Parameters:
serviceType
- the type of service we're looking forconstraint
- see KTraderpreferences
- see KTradererror
- On failure, error
contains a description of the error
that occurred. If the pointer is 0, the argument will be
ignoreddcopService
- On success, dcopService
contains the DCOP name
under which this service is available. If the pointer is 0 the argument
will be ignoredflags
- for future extensions (currently unused)
- Returns:
- an error code indicating success (== 0) or failure (> 0).
findServiceFor
public int findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService)
findServiceFor
public int findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error)
findServiceFor
public int findServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences)
findServiceFor
public int findServiceFor(java.lang.String serviceType,
java.lang.String constraint)
findServiceFor
public int findServiceFor(java.lang.String serviceType)
startServiceFor
public int startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService,
int flags)
- Find an implementation of the given
serviceType
,
and start it, to use its DCOP interface.
The default implementation uses KTrader to find the preferred Application,
and then starts it using kapp.startService...
However applications (like kontact) can reimplement this method, to provide
an in-process way of loading the implementation for this service type.
- Parameters:
serviceType
- the type of service we're looking forconstraint
- see KTraderpreferences
- see KTradererror
- On failure, error
contains a description of the error
that occurred. If the pointer is 0, the argument will be
ignoreddcopService
- On success, dcopService
contains the DCOP name
under which this service is available. If the pointer is 0 the argument
will be ignoredflags
- for future extensions (currently unused)
- Returns:
- an error code indicating success (== 0) or failure (> 0).
startServiceFor
public int startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error,
java.lang.StringBuffer dcopService)
startServiceFor
public int startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences,
java.lang.StringBuffer error)
startServiceFor
public int startServiceFor(java.lang.String serviceType,
java.lang.String constraint,
java.lang.String preferences)
startServiceFor
public int startServiceFor(java.lang.String serviceType,
java.lang.String constraint)
startServiceFor
public int startServiceFor(java.lang.String serviceType)
self
public static KDCOPServiceStarter self()