merge the formfield patch from ooo-build
[ooovba.git] / ridljar / com / sun / star / uno / IBridge.java
blobfe88f47aaba3bf976df964a0079e84eb0764b16f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: IBridge.java,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package com.sun.star.uno;
33 import java.io.IOException;
35 /**
36 * This is abstract interface for bridges.
38 * <p>Bridges are able to map one object from one UNO environment to another and
39 * vice versa.<p>
41 * @see com.sun.star.uno.IBridge
42 * @see com.sun.star.uno.IQueryInterface
43 * @see com.sun.star.uno.UnoRuntime
45 * @deprecated As of UDK 3.2, this interface is deprecated, without offering a
46 * replacement.
48 public interface IBridge {
49 /**
50 * Maps an object from the source environment to the destination
51 * environment.
53 * @param object the object to map
54 * @param type the type of the interface that shall be mapped
55 * @return the object in the destination environment
57 Object mapInterfaceTo(Object object, Type type);
59 /**
60 * Maps an object from the destination environment to the source
61 * environment.
63 * @param object the object to map
64 * @param type the type of the interface that shall be mapped
65 * @return the object in the source environment
67 Object mapInterfaceFrom(Object object, Type type);
69 /**
70 * Returns the source environment.
72 * @return the source environment of this bridge
74 IEnvironment getSourceEnvironment();
76 /**
77 * Returns the destination environment.
79 * @return the destination environment of this bridge
81 IEnvironment getTargetEnvironment();
83 /**
84 * Increases the life count.
86 void acquire();
88 /**
89 * Decreases the life count.
91 * <p>If the life count drops to zero, the bridge disposes itself.</p>
93 void release();
95 /**
96 * Disposes the bridge.
98 * <p>Sends involved threads an <code>InterruptedException</code>. Releases
99 * mapped objects.</p>
101 void dispose() throws InterruptedException, IOException;