2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package com
.sun
.star
.uno
;
21 import java
.io
.IOException
;
24 * This is abstract interface for bridges.
26 * <p>Bridges are able to map one object from one UNO environment to another and
29 * @see com.sun.star.uno.IBridge
30 * @see com.sun.star.uno.IQueryInterface
31 * @see com.sun.star.uno.UnoRuntime
33 * @deprecated As of UDK 3.2, this interface is deprecated, without offering a
37 public interface IBridge
{
39 * Maps an object from the source environment to the destination
42 * @param object the object to map
43 * @param type the type of the interface that shall be mapped
44 * @return the object in the destination environment
46 Object
mapInterfaceTo(Object object
, Type type
);
49 * Maps an object from the destination environment to the source
52 * @param object the object to map
53 * @param type the type of the interface that shall be mapped
54 * @return the object in the source environment
56 Object
mapInterfaceFrom(Object object
, Type type
);
59 * Returns the source environment.
61 * @return the source environment of this bridge
63 IEnvironment
getSourceEnvironment();
66 * Returns the destination environment.
68 * @return the destination environment of this bridge
70 IEnvironment
getTargetEnvironment();
73 * Increases the life count.
78 * Decreases the life count.
80 * <p>If the life count drops to zero, the bridge disposes itself.</p>
85 * Disposes the bridge.
87 * <p>Sends involved threads an <code>InterruptedException</code>. Releases
90 * @throws InterruptedException it's deprecated so who cares.
91 * @throws IOException it's deprecated so who cares.
93 void dispose() throws InterruptedException
, IOException
;