Class java_remote_bridge
- All Implemented Interfaces:
com.sun.star.bridge.XBridge
,com.sun.star.lang.XComponent
,IReceiver
,DisposeNotifier
,IBridge
,com.sun.star.uno.XInterface
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
.
- Since:
- UDK1.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected IProtocol
protected IThreadPool
protected IEnvironment
protected final AtomicInteger
protected com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher
protected String
protected com.sun.star.connection.XConnection
protected com.sun.star.bridge.XInstanceProvider
Fields inherited from interface com.sun.star.bridge.XBridge
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XComponent
UNOTYPEINFO
-
Constructor Summary
ConstructorDescriptionjava_remote_bridge
(IEnvironment java_environment, IEnvironment remote_environment, Object[] args) java_remote_bridge
(Object[] args) Deprecated.as of UDK 1.0 -
Method Summary
Modifier and TypeMethodDescriptionvoid
acquire()
Increases the life count.void
addDisposeListener
(DisposeListener listener) Adds a dispose listener, to be notified when this object is disposed.void
addEventListener
(com.sun.star.lang.XEventListener xEventListener) Methods XComponent.void
dispose()
Disposes the bridge.Gives a description of the connection type and protocol used.getInstance
(String instanceName) getName()
Gives the name of this bridge.Gives the source environment.Gives the destination environment.mapInterfaceFrom
(Object oId, Type type) Maps an object from destination environment to the source environment.mapInterfaceTo
(Object object, Type type) Maps an object from the source environment to the destination environment.void
release()
Decreases the life count.void
removeEventListener
(com.sun.star.lang.XEventListener xEventListener) void
Send back a reply for a request.sendRequest
(String oid, Type type, String operation, Object[] params)
-
Field Details
-
_xConnection
protected com.sun.star.connection.XConnection _xConnection -
_xInstanceProvider
protected com.sun.star.bridge.XInstanceProvider _xInstanceProvider -
_name
-
_iProtocol
-
_java_environment
-
_messageDispatcher
protected com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.MessageDispatcher _messageDispatcher -
_life_count
-
_iThreadPool
-
-
Constructor Details
-
java_remote_bridge
public java_remote_bridge(IEnvironment java_environment, IEnvironment remote_environment, Object[] args) throws Exception - Throws:
Exception
-
java_remote_bridge
Deprecated.as of UDK 1.0Constructs a new bridge.This method is not part of the provided
api
and should only be used by the UNO runtime.- Parameters:
args
- the custom parameters: arg[0] == protocol_name, arg[1] == xConnection, arg[2] == xInstanceProvider.- Throws:
Exception
-
-
Method Details
-
mapInterfaceTo
Description copied from interface:IBridge
Maps an object from the source environment to the destination environment.- Specified by:
mapInterfaceTo
in interfaceIBridge
- Parameters:
object
- the object to maptype
- the type of the interface that shall be mapped- Returns:
- the object in the destination environment
- See Also:
-
mapInterfaceFrom
Maps an object from destination environment to the source environment.- Specified by:
mapInterfaceFrom
in interfaceIBridge
- Parameters:
oId
- the object to map.type
- the interface under which is to be mapped.- Returns:
- the object in the source environment.
- See Also:
-
getSourceEnvironment
Gives the source environment.- Specified by:
getSourceEnvironment
in interfaceIBridge
- Returns:
- the source environment of this bridge.
- See Also:
-
getTargetEnvironment
Gives the destination environment.- Specified by:
getTargetEnvironment
in interfaceIBridge
- Returns:
- the destination environment of this bridge.
- See Also:
-
acquire
public void acquire()Increases the life count. -
release
public void release()Decreases the life count.If the life count drops to zero, the bridge disposes itself.
-
dispose
public void dispose()Description copied from interface:IBridge
Disposes the bridge.Sends involved threads an
InterruptedException
. Releases mapped objects. -
getInstance
- Specified by:
getInstance
in interfacecom.sun.star.bridge.XBridge
- See Also:
-
XBridge.getInstance(java.lang.String)
-
getName
Gives the name of this bridge.- Specified by:
getName
in interfacecom.sun.star.bridge.XBridge
- Returns:
- the name of this bridge.
- See Also:
-
XBridge.getName()
-
getDescription
Gives a description of the connection type and protocol used.- Specified by:
getDescription
in interfacecom.sun.star.bridge.XBridge
- Returns:
- connection type and protocol.
- See Also:
-
XBridge.getDescription()
-
sendReply
Description copied from interface:IReceiver
Send back a reply for a request. -
sendRequest
public Object sendRequest(String oid, Type type, String operation, Object[] params) throws Throwable - Throws:
Throwable
-
addEventListener
public void addEventListener(com.sun.star.lang.XEventListener xEventListener) Methods XComponent.- Specified by:
addEventListener
in interfacecom.sun.star.lang.XComponent
-
removeEventListener
public void removeEventListener(com.sun.star.lang.XEventListener xEventListener) - Specified by:
removeEventListener
in interfacecom.sun.star.lang.XComponent
-
addDisposeListener
Description copied from interface:DisposeNotifier
Adds a dispose listener, to be notified when this object is disposed.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 notifier, the listener must eventually receive anotifyDispose
callback.- Specified by:
addDisposeListener
in interfaceDisposeNotifier
- Parameters:
listener
- a dispose listener, to be notified when this object is disposed; must not benull
- See Also:
-