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#ifndef _COM_SUN_STAR_BRIDGE_XBRIDGEFACTORY_IDL_ 24#define _COM_SUN_STAR_BRIDGE_XBRIDGEFACTORY_IDL_ 25 26#include <com/sun/star/lang/IllegalArgumentException.idl> 27 28#include <com/sun/star/connection/XConnection.idl> 29#include <com/sun/star/bridge/XBridge.idl> 30#include <com/sun/star/bridge/BridgeExistsException.idl> 31#include <com/sun/star/bridge/XInstanceProvider.idl> 32 33 module com { module sun { module star { module bridge { 34 35/** factory to create interprocess bridges. 36 */ 37published interface XBridgeFactory: com::sun::star::uno::XInterface 38{ 39 /** tries to create a UNO interprocess bridge. 40 41 @param sName 42 The name of the bridge. This allows other components to reuse 43 an already created bridge (using getBridge). 44 <p> 45 If empty, an anonymous bridge is created, which cannot be retrieved with 46 getBridge(). No BridgeExistsException can be thrown in this case. 47 48 @param sProtocol 49 The protocol, that will be used on the connection (e.g., urp) plus additional 50 comma separated name=value protocol properties. 51 52 @param aConnection 53 The connection, which is used to transfer the calls. The bridge expects to 54 own the connection, thus it will close the connection, in case it does not 55 need it anymore. 56 57 @param anInstanceProvider 58 gets called, when a request from remote comes in. You can pass a null reference 59 in case you don't want to export any objects. 60 61 @throws BridgeExistsException 62 There is already a bridge registered with this name. Use getBridge instead. 63 64 @throws IllegalArgumentException 65 The protocol is unknown or the connection is null. 66 */ 67 XBridge createBridge( 68 [in] string sName, 69 [in] string sProtocol , 70 [in] com::sun::star::connection::XConnection aConnection , 71 [in] XInstanceProvider anInstanceProvider ) 72 raises ( BridgeExistsException , com::sun::star::lang::IllegalArgumentException ); 73 74 75 /** tries to get a bridge by this name. 76 <p> Cannot be retrieved, when the bridge got disposed before. 77 78 @return An existing remote bridge or a null reference. 79 */ 80 XBridge getBridge( [in] string sName ); 81 82 /** returns the sequence of all named and unnamed UNO interprocess 83 bridges that are instantiated at the time the call is made. 84 */ 85 sequence < XBridge > getExistingBridges( ); 86}; 87 88 89};};};}; 90 91#endif 92