1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: IBridge.java,v $
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
;
36 * This is abstract interface for bridges.
38 * <p>Bridges are able to map one object from one UNO environment to another and
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
48 public interface IBridge
{
50 * Maps an object from the source environment to the destination
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
);
60 * Maps an object from the destination environment to the source
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
);
70 * Returns the source environment.
72 * @return the source environment of this bridge
74 IEnvironment
getSourceEnvironment();
77 * Returns the destination environment.
79 * @return the destination environment of this bridge
81 IEnvironment
getTargetEnvironment();
84 * Increases the life count.
89 * Decreases the life count.
91 * <p>If the life count drops to zero, the bridge disposes itself.</p>
96 * Disposes the bridge.
98 * <p>Sends involved threads an <code>InterruptedException</code>. Releases
101 void dispose() throws InterruptedException
, IOException
;