Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.13
UNO Java Runtime

com.sun.star.uno
Interface IEnvironment


public interface IEnvironment

This is the interface which UNO environments have to implement. With this interface objects can be registered and revoked from an environment.

Since:
UDK1.0
See Also:
UnoRuntime, IQueryInterface, IBridge

Method Summary
 java.lang.Object getContext()
          Gets the context of this environment.
 java.lang.String getName()
          Get the name of this environment.
 java.lang.Object getRegisteredInterface(java.lang.String oId, Type type)
          Retrieves an registered interface identified by its object id and type from this environment.
 java.lang.String getRegisteredObjectIdentifier(java.lang.Object object)
          Retrieves the object identifier for a registered interface from this environment.
 void list()
          For debug purposes.
 java.lang.Object registerInterface(java.lang.Object object, java.lang.String[] oId, Type type)
          registers internal and external interfaces via this method.
 void revokeInterface(java.lang.String oId, Type type)
          revokes a previously registered interface.
 

Method Detail

getContext

public java.lang.Object getContext()
Gets the context of this environment.

Returns:
the context of the environment.

getName

public java.lang.String getName()
Get the name of this environment.

Returns:
the name of the environment

registerInterface

public java.lang.Object registerInterface(java.lang.Object object,
                                          java.lang.String[] oId,
                                          Type type)
registers internal and external interfaces via this method. Internal interfaces are proxies that are used in an environment. External interfaces are interfaces that are exported to another environment, thus providing an object identifier for this task. This can be called an external reference. Interfaces are held weakly at an environment; they demand a final revokeInterface() call for each interface that has been registered.

Parameters:
object - inout parameter for the registered object
type - type of this interface

revokeInterface

public void revokeInterface(java.lang.String oId,
                            Type type)
revokes a previously registered interface. If an interfaces has been revoked as often as it has been registered, it can't be reached anymore via the getRegisteredInterface method.

Parameters:
oId - object id of interface to be revoked

getRegisteredInterface

public java.lang.Object getRegisteredInterface(java.lang.String oId,
                                               Type type)
Retrieves an registered interface identified by its object id and type from this environment.

Parameters:
oId - object id of interface to be retrieved

getRegisteredObjectIdentifier

public java.lang.String getRegisteredObjectIdentifier(java.lang.Object object)
Retrieves the object identifier for a registered interface from this environment.

Parameters:
object - a registered interface

list

public void list()
For debug purposes. Lists the registered objects to stdout.


UNO Java Runtime

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.