xref: /aoo41x/main/offapi/com/sun/star/task/XJob.idl (revision d1766043)
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_XJob_idl__
25#define __com_sun_star_task_XJob_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//=============================================================================
44/** specifies a job which is to be executed synchronously
45
46    <p>
47    Instead of <type>XAsyncJob</type> the implementation of this interface
48    will be executed synchronously everytimes. That means: they can be shure that the
49    current stack context will be blocked till this job finish it's work.
50    </p>
51
52    @see XAsyncJob
53*/
54published interface XJob : com::sun::star::uno::XInterface
55{
56    //------------------------------------------------------------------------
57    /** executes the job synchronously
58
59        @param Arguments
60            are arguments for executing the job. Their semantics is completely implementation dependent. Usually,
61            a concrete implementation of a job specifies in its service descriptions which parameters are allowed
62            (or expected). This values are persistent by the configuration of the <type>JobExecutor</type>
63            which use this synchronous job. It's possible to write it back by use special protocol
64            in return value.
65
66        @return
67            the result of the job. The concrete semantics is service-dependent.
68            But it should be possible to
69            <ul>
70                <li>deregister the job</li>
71                <li>let him registered although execution was successfully(!)</li>
72                <li>make some job specific data persistent inside the job configuration which
73                    is provided by the executor.</li>
74            </ul>
75
76        @throws com::sun::star::lang::IllegalArgumentException
77            if some of given arguments doesn't fill out the service specification or
78            was corrupt so the service couldn't work correctly
79
80        @throws com::sun::star::uno::Exception
81            to notify the excutor about faild operation; otherwise the return value
82            indicates a successfull finishing.
83	*/
84    any execute(
85        [in] sequence< com::sun::star::beans::NamedValue > Arguments )
86            raises( com::sun::star::lang::IllegalArgumentException ,
87                    com::sun::star::uno::Exception                 );
88};
89
90}; }; }; };
91
92#endif
93