Top Fields Constructors Methods
com.sun.star.lib.uno.environments.remote

public final Class remote_environment

extends Object
implements IEnvironment
Class Inheritance
All Implemented Interfaces
com.sun.star.uno.IEnvironment
Imports
com.sun.star.uno.IEnvironment, .Type

References Deprecated

IEnvironment is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private final Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
getContext()

Implements com.sun.star.uno.IEnvironment.getContext.

Gets the context of this environment.

public String
getName()

Implements com.sun.star.uno.IEnvironment.getName.

Gets the name of this environment.

public Object
getRegisteredInterface(String oid, Type type)

Implements com.sun.star.uno.IEnvironment.getRegisteredInterface.

Retrieves a registered object, specified by OID and UNO interface type.

public String
getRegisteredObjectIdentifier(Object object)

Implements com.sun.star.uno.IEnvironment.getRegisteredObjectIdentifier.

Retrieves the OID for a registered object.

public void
list()

Implements com.sun.star.uno.IEnvironment.list.

Lists the registered objects to System.out.

public Object
registerInterface(Object object, String[] oid, Type type)

Implements com.sun.star.uno.IEnvironment.registerInterface.

Registers one UNO interface facet of an object.

public void
revokeInterface(String oid, Type type)

Implements com.sun.star.uno.IEnvironment.revokeInterface.

Explicitly revokes a UNO interface facet.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final Object context

Constructor Detail

remote_environmentback to summary
public remote_environment(Object context)

Method Detail

getContextback to summary
public Object getContext()

Implements com.sun.star.uno.IEnvironment.getContext.

Doc from com.sun.star.uno.IEnvironment.getContext.

Gets the context of this environment.

getNameback to summary
public String getName()

Implements com.sun.star.uno.IEnvironment.getName.

Doc from com.sun.star.uno.IEnvironment.getName.

Gets the name of this environment.

getRegisteredInterfaceback to summary
public Object getRegisteredInterface(String oid, Type type)

Implements com.sun.star.uno.IEnvironment.getRegisteredInterface.

Doc from com.sun.star.uno.IEnvironment.getRegisteredInterface.

Retrieves a registered object, specified by OID and UNO interface type.

getRegisteredObjectIdentifierback to summary
public String getRegisteredObjectIdentifier(Object object)

Implements com.sun.star.uno.IEnvironment.getRegisteredObjectIdentifier.

Doc from com.sun.star.uno.IEnvironment.getRegisteredObjectIdentifier.

Retrieves the OID for a registered object.

listback to summary
public void list()

Implements com.sun.star.uno.IEnvironment.list.

Doc from com.sun.star.uno.IEnvironment.list.

Lists the registered objects to System.out.

This is for debug purposes.

registerInterfaceback to summary
public Object registerInterface(Object object, String[] oid, Type type)

Implements com.sun.star.uno.IEnvironment.registerInterface.

Doc from com.sun.star.uno.IEnvironment.registerInterface.

Registers one UNO interface facet of an object.

Such an object will typically be one of three things:

  • A local Java object, to be mapped out of this environment via a given bridge.
  • A proxy object, mapped into this environment via some bridge B1, and now to be mapped out of this environment via a given bridge B2.
  • A proxy object, created as a remote object is mapped into this environment via a given bridge.

The object actually registered may differ from the specified object that is passed as an argument. This enables an environment to work in a multi-threaded scenario, where two threads can call registerInterface for the same combination of oid and type at the same time; the race condition is solved by letting one of the calls register its argument object, ignoring the argument object of the other call, and letting both calls return the same object.

The registered object is held only weakly by the environment. After a call to registerInterface, a call to getRegisteredInterface only succeeds as long as the registered object is still strongly reachable, and the registered object has not been explicitly revoked by calling revokeInterface.

revokeInterfaceback to summary
public void revokeInterface(String oid, Type type)

Implements com.sun.star.uno.IEnvironment.revokeInterface.

Doc from com.sun.star.uno.IEnvironment.revokeInterface.

Explicitly revokes a UNO interface facet.

Calls to registerInterface and revokeInterface must be paired. A facet is only removed from the environment when it has been revoked as often as it has been registered. This may change in the future, so that a facet would be removed upon the first call to revokeInterface (and calls to revokeInterface would no longer be necessary if the calling code does not want to control the temporal extent of the registration).

It is not an error if the specified facet is not registered at this environment (either because no corresponding object has ever been registered, or it has been explicitly revoked, or it is no longer strongly reachable). In such a case, this method simply does nothing.