public class java_remote_bridge extends java.lang.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 java.util.concurrent.atomic.AtomicInteger |
_life_count |
protected com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher |
_messageDispatcher |
protected java.lang.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,
java.lang.Object[] args) |
java_remote_bridge(java.lang.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() |
java.lang.String |
getDescription()
Gives a description of the connection type and protocol used.
|
java.lang.Object |
getInstance(java.lang.String instanceName) |
java.lang.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.
|
java.lang.Object |
mapInterfaceFrom(java.lang.Object oId,
com.sun.star.uno.Type type)
Maps an object from destination environment to the source environment.
|
java.lang.Object |
mapInterfaceTo(java.lang.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,
java.lang.Object result)
Send back a reply for a request.
|
java.lang.Object |
sendRequest(java.lang.String oid,
com.sun.star.uno.Type type,
java.lang.String operation,
java.lang.Object[] params) |
protected com.sun.star.connection.XConnection _xConnection
protected com.sun.star.bridge.XInstanceProvider _xInstanceProvider
protected java.lang.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 java.util.concurrent.atomic.AtomicInteger _life_count
protected IThreadPool _iThreadPool
public java_remote_bridge(com.sun.star.uno.IEnvironment java_environment,
com.sun.star.uno.IEnvironment remote_environment,
java.lang.Object[] args)
throws java.lang.Exception
java.lang.Exceptionpublic java_remote_bridge(java.lang.Object[] args)
throws java.lang.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.java.lang.Exceptionpublic java.lang.Object mapInterfaceTo(java.lang.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 java.lang.Object mapInterfaceFrom(java.lang.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 java.lang.Object getInstance(java.lang.String instanceName)
getInstance in interface com.sun.star.bridge.XBridgeXBridge.getInstance(java.lang.String)public java.lang.String getName()
getName in interface com.sun.star.bridge.XBridgeXBridge.getName()public java.lang.String getDescription()
getDescription in interface com.sun.star.bridge.XBridgeXBridge.getDescription()public void sendReply(boolean exception,
ThreadId threadId,
java.lang.Object result)
IReceiverpublic java.lang.Object sendRequest(java.lang.String oid,
com.sun.star.uno.Type type,
java.lang.String operation,
java.lang.Object[] params)
throws java.lang.Throwable
java.lang.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)