xref: /aoo4110/main/offapi/com/sun/star/task/XAsyncJob.idl (revision b1cdbd2c)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_task_XAsyncJob_idl__
25#define __com_sun_star_task_XAsyncJob_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_beans_NamedValue_idl__
32#include <com/sun/star/beans/NamedValue.idl>
33#endif
34
35#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
36#include <com/sun/star/lang/IllegalArgumentException.idl>
37#endif
38
39//=============================================================================
40
41module com {  module sun {  module star {  module task {
42
43 published interface XJobListener;
44
45//=============================================================================
46/** specifies a job which must be executed asynchronously
47
48    <p>
49    Instead of <type>XJob</type> the implementation of this interface
50    must be aware, that execution can be made real asynchronous (e.g. by using
51    threads). Because the environment whish to have creation and using of threads
52    under control, it's not allowed for a real job implementation to use such mechanism
53    by itself. The outside code decide, if it's possible and how it can be made
54    asynchronous. In some special cases it can be, that asynchronous jobs will be executed
55    synchronously.
56    </p>
57
58    @see XJob
59*/
60published interface XAsyncJob : com::sun::star::uno::XInterface
61{
62    //------------------------------------------------------------------------
63	/** executes the job asynchronously
64
65        @param Arguments
66            are arguments for executing the job. Their semantics is completely implementation dependent. Usually,
67            a concrete implementation of a job specifies in its service descriptions which parameters are allowed
68            (or expected). This values are persistent by the configuration of the <type>JobExecutor</type>
69            which use this asynchronous job. It's possible to write it back by called listener
70            function <member>XJobListener::jobFinished()</member>.
71
72        @param Listener
73            specifies a listener which should be notified on events. May be <NULL/>.
74
75        @throws com::sun::star::lang::IllegalArgumentException
76            if some of given arguments doesn't fill out the service specification or
77            was corrupt so the service couldn't work correctly
78	*/
79   void executeAsync(
80        [in] sequence< com::sun::star::beans::NamedValue > Arguments,
81        [in] XJobListener Listener)
82            raises( com::sun::star::lang::IllegalArgumentException );
83};
84
85}; }; }; };
86
87#endif
88
89