public class java_remote_bridge extends java.lang.Object implements IBridge, IReceiver, DisposeNotifier
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 IEnvironment |
_java_environment |
protected int |
_life_count |
protected com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher |
_messageDispatcher |
protected java.lang.String |
_name |
protected XConnection |
_xConnection |
protected XInstanceProvider |
_xInstanceProvider |
Constructor and Description |
---|
java_remote_bridge(IEnvironment java_environment,
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(DisposeListener listener)
Adds a dispose listener, to be notified when this object is disposed.
|
void |
addEventListener(XEventListener xEventListener) |
void |
dispose()
Disposes the bridge.
|
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
|
IEnvironment |
getSourceEnvironment()
Gives the source environment.
|
IEnvironment |
getTargetEnvironment()
Gives the destination environment.
|
java.lang.Object |
mapInterfaceFrom(java.lang.Object oId,
Type type)
Maps an object from destination environment to the source environment.
|
java.lang.Object |
mapInterfaceTo(java.lang.Object object,
Type type)
Maps an object from the source environment to the destination
environment.
|
void |
release()
Decreases the life count.
|
void |
removeEventListener(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,
Type type,
java.lang.String operation,
java.lang.Object[] params) |
protected XConnection _xConnection
protected XInstanceProvider _xInstanceProvider
protected java.lang.String _name
protected IProtocol _iProtocol
protected IEnvironment _java_environment
protected com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher _messageDispatcher
protected int _life_count
protected IThreadPool _iThreadPool
public java_remote_bridge(IEnvironment java_environment, IEnvironment remote_environment, java.lang.Object[] args) throws java.lang.Exception
java.lang.Exception
public 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] == xInstanceProviderjava.lang.Exception
public java.lang.Object mapInterfaceTo(java.lang.Object object, Type type)
IBridge
mapInterfaceTo
in interface IBridge
object
- the object to maptype
- the type of the interface that shall be mappedpublic java.lang.Object mapInterfaceFrom(java.lang.Object oId, Type type)
mapInterfaceFrom
in interface IBridge
object
- the object to maptype
- the interface under which is to be mappedIBridge.mapInterfaceFrom(java.lang.Object, com.sun.star.uno.Type)
public IEnvironment getSourceEnvironment()
getSourceEnvironment
in interface IBridge
IBridge.getSourceEnvironment()
public IEnvironment getTargetEnvironment()
getTargetEnvironment
in interface IBridge
IBridge.getTargetEnvironment()
public void acquire()
acquire
in interface IBridge
IBridge.acquire()
public void release()
release
in interface IBridge
IBridge.release()
public void dispose()
IBridge
Sends involved threads an InterruptedException
. Releases
mapped objects.
public java.lang.Object getInstance(java.lang.String instanceName)
public java.lang.String getName()
com.sun.star.bridge.XBridge#getName
public java.lang.String getDescription()
com.sun.star.bridge.XBridge#getDescription
public void sendReply(boolean exception, ThreadId threadId, java.lang.Object result)
IReceiver
public java.lang.Object sendRequest(java.lang.String oid, Type type, java.lang.String operation, java.lang.Object[] params) throws java.lang.Throwable
java.lang.Throwable
public void addEventListener(XEventListener xEventListener)
public void removeEventListener(XEventListener xEventListener)
public void addDisposeListener(DisposeListener listener)
DisposeNotifier
It is unspecified what happens when the same listener is added multiple times.
It is unspecified exactly when the notifyDispose
callback
is fired: immediately before the notifier is disposed, while it is in the
process of disposing, or some time after it got disposed. But even if
adding a listener to an already disposed notifer, the listener must
eventually receive a notifyDispose
callback.
addDisposeListener
in interface DisposeNotifier
listener
- a dispose listener, to be notified when this object is
disposed; must not be null