Ontimize 5.2072EN

com.ontimize.locator
Interface EntityReferenceLocator

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
SecureEntityReferenceLocator
All Known Implementing Classes:
ReferenceLocator, SecureReferenceLocator

public interface EntityReferenceLocator
extends java.rmi.Remote

This interface defines the methods that must be implemented by a object that provides entity references.
This interface extends Remote to provide RMI support. In this way is easy to implement a reference remote locator.
Security must be implemented in all classes that use this interface.
The method getEntityReference(String) has not parameters to identify the user to avoid that all application components need to know this values.

Version:
1.1 20/05/2001
See Also:
SecureEntityReferenceLocator

Method Summary
 void endSession(int id)
          This method finishes a client session.
 Entity getEntityReference(java.lang.String entityName)
          This method gets an entity reference.
 int getSessionId()
          Method to know the client session identifier.
 int startSession(java.lang.String user, java.lang.String password, ClientWatch client)
          Method to start a client session.
 

Method Detail

startSession

public int startSession(java.lang.String user,
                        java.lang.String password,
                        ClientWatch client)
                 throws java.lang.Exception
Method to start a client session. Entity reference locator returns an integer value that must be used in all entity requests.

Parameters:
user - User name
password - User password
client - Object to checks if this session is open
Returns:
Integer value not negative used to identifier this client and allows him to get entity references
Throws:
java.lang.Exception

getEntityReference

public Entity getEntityReference(java.lang.String entityName)
                          throws java.lang.Exception
This method gets an entity reference.

Parameters:
entityName - Entity name
Returns:
Throws:
java.lang.Exception

getSessionId

public int getSessionId()
                 throws java.lang.Exception
Method to know the client session identifier. This is only used in client side. In the server side these methods throw an exception.

Returns:
Client session identifier.
Throws:
java.lang.Exception

endSession

public void endSession(int id)
                throws java.lang.Exception
This method finishes a client session. When this method is called, the entity reference locator does not provide more entity references to this client identifier.

Parameters:
id - Client session identifier
Throws:
java.lang.Exception

Ontimize