public class java_remote_bridge extends Object implements com.sun.star.uno.IBridge, IReceiver, com.sun.star.bridge.XBridge, com.sun.star.lang.XComponent, com.sun.star.lib.util.DisposeNotifier
Therefore various interfaces are implemented.
The protocol to used is passed by name, the bridge
then looks for it under com.sun.star.lib.uno.protocols.
| Modifier and Type | Field and Description |
|---|---|
protected IProtocol |
_iProtocol |
protected IThreadPool |
_iThreadPool |
protected com.sun.star.uno.IEnvironment |
_java_environment |
protected AtomicInteger |
_life_count |
protected com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher |
_messageDispatcher |
protected String |
_name |
protected com.sun.star.connection.XConnection |
_xConnection |
protected com.sun.star.bridge.XInstanceProvider |
_xInstanceProvider |
| Constructor and Description |
|---|
java_remote_bridge(com.sun.star.uno.IEnvironment java_environment,
com.sun.star.uno.IEnvironment remote_environment,
Object[] args) |
java_remote_bridge(Object[] args)
Deprecated.
as of UDK 1.0
|
| Modifier and Type | Method and Description |
|---|---|
void |
acquire()
Increases the life count.
|
void |
addDisposeListener(com.sun.star.lib.util.DisposeListener listener) |
void |
addEventListener(com.sun.star.lang.XEventListener xEventListener)
Methods XComponent.
|
void |
dispose() |
String |
getDescription()
Gives a description of the connection type and protocol used.
|
Object |
getInstance(String instanceName) |
String |
getName()
Gives the name of this bridge.
|
com.sun.star.uno.IEnvironment |
getSourceEnvironment()
Gives the source environment.
|
com.sun.star.uno.IEnvironment |
getTargetEnvironment()
Gives the destination environment.
|
Object |
mapInterfaceFrom(Object oId,
com.sun.star.uno.Type type)
Maps an object from destination environment to the source environment.
|
Object |
mapInterfaceTo(Object object,
com.sun.star.uno.Type type) |
void |
release()
Decreases the life count.
|
void |
removeEventListener(com.sun.star.lang.XEventListener xEventListener) |
void |
sendReply(boolean exception,
ThreadId threadId,
Object result)
Send back a reply for a request.
|
Object |
sendRequest(String oid,
com.sun.star.uno.Type type,
String operation,
Object[] params) |
protected com.sun.star.connection.XConnection _xConnection
protected com.sun.star.bridge.XInstanceProvider _xInstanceProvider
protected String _name
protected IProtocol _iProtocol
protected com.sun.star.uno.IEnvironment _java_environment
protected com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher _messageDispatcher
protected final AtomicInteger _life_count
protected IThreadPool _iThreadPool
public java_remote_bridge(com.sun.star.uno.IEnvironment java_environment,
com.sun.star.uno.IEnvironment remote_environment,
Object[] args)
throws Exception
Exceptionpublic java_remote_bridge(Object[] args) throws Exception
This method is not part of the provided api
and should only be used by the UNO runtime.
args - the custom parameters: arg[0] == protocol_name,
arg[1] == xConnection, arg[2] == xInstanceProvider.Exceptionpublic Object mapInterfaceTo(Object object, com.sun.star.uno.Type type)
mapInterfaceTo in interface com.sun.star.uno.IBridgeIBridge.mapInterfaceTo(java.lang.Object, com.sun.star.uno.Type)public Object mapInterfaceFrom(Object oId, com.sun.star.uno.Type type)
mapInterfaceFrom in interface com.sun.star.uno.IBridgeoId - the object to map.type - the interface under which is to be mapped.IBridge.mapInterfaceFrom(java.lang.Object, com.sun.star.uno.Type)public com.sun.star.uno.IEnvironment getSourceEnvironment()
getSourceEnvironment in interface com.sun.star.uno.IBridgeIBridge.getSourceEnvironment()public com.sun.star.uno.IEnvironment getTargetEnvironment()
getTargetEnvironment in interface com.sun.star.uno.IBridgeIBridge.getTargetEnvironment()public void acquire()
acquire in interface com.sun.star.uno.IBridgeIBridge.acquire()public void release()
If the life count drops to zero, the bridge disposes itself.
release in interface com.sun.star.uno.IBridgeIBridge.release()public void dispose()
dispose in interface com.sun.star.lang.XComponentdispose in interface com.sun.star.uno.IBridgepublic Object getInstance(String instanceName)
getInstance in interface com.sun.star.bridge.XBridgeXBridge.getInstance(java.lang.String)public String getName()
getName in interface com.sun.star.bridge.XBridgeXBridge.getName()public String getDescription()
getDescription in interface com.sun.star.bridge.XBridgeXBridge.getDescription()public void sendReply(boolean exception,
ThreadId threadId,
Object result)
IReceiverpublic Object sendRequest(String oid, com.sun.star.uno.Type type, String operation, Object[] params) throws Throwable
Throwablepublic void addEventListener(com.sun.star.lang.XEventListener xEventListener)
addEventListener in interface com.sun.star.lang.XComponentpublic void removeEventListener(com.sun.star.lang.XEventListener xEventListener)
removeEventListener in interface com.sun.star.lang.XComponentpublic void addDisposeListener(com.sun.star.lib.util.DisposeListener listener)
addDisposeListener in interface com.sun.star.lib.util.DisposeNotifierDisposeNotifier.addDisposeListener(com.sun.star.lib.util.DisposeListener)