Ontimize 5.2072EN

com.ontimize.util.rmi
Class ConnectionBean

java.lang.Object
  extended bycom.ontimize.util.rmi.ConnectionBean

public class ConnectionBean
extends java.lang.Object


Field Summary
static java.lang.String CGIPATH
           
static java.lang.String defaultProperties
           
static java.lang.String HTTP
           
static java.lang.String HTTPPORT
           
static java.lang.String PASSWORD
           
static java.lang.String PORT
           
static java.lang.String REMOTE_LOCATOR_NAME
           
static java.lang.String SERVER_HOSTNAME
           
static java.lang.String SSL
           
static java.lang.String USER
           
 
Constructor Summary
ConnectionBean()
          Creates an instance of ConnectinBean.
ConnectionBean(java.util.Properties properties)
           
ConnectionBean(java.lang.String propertiesResource)
           
 
Method Summary
 EntityResult delete(java.util.Hashtable keysValues, java.lang.String entity)
          Executes a delete operation against the server
 void endSession(int sessionId)
          This method closes the specified session indicated in parameter.
 Entity getEntityReference(java.lang.String entity)
           
 EntityReferenceLocator getReferenceLocator()
           
 int getSessionId()
           
 java.lang.String getUser()
           
protected  void init(java.util.Properties properties)
          Initializes parameters.
 EntityResult insert(java.util.Hashtable attributesValues, java.lang.String entity)
           
 EntityResult query(java.util.Hashtable keysValues, java.util.Vector attributesValues, java.lang.String entity)
          Executes a query against the server
protected static void removeRMISocketFactory()
           
 EntityResult update(java.util.Hashtable attributesValues, java.util.Hashtable keysValues, java.lang.String entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final java.lang.String PORT
See Also:
Constant Field Values

SERVER_HOSTNAME

public static final java.lang.String SERVER_HOSTNAME
See Also:
Constant Field Values

REMOTE_LOCATOR_NAME

public static final java.lang.String REMOTE_LOCATOR_NAME
See Also:
Constant Field Values

USER

public static final java.lang.String USER
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
See Also:
Constant Field Values

SSL

public static final java.lang.String SSL
See Also:
Constant Field Values

HTTP

public static final java.lang.String HTTP
See Also:
Constant Field Values

CGIPATH

public static final java.lang.String CGIPATH
See Also:
Constant Field Values

HTTPPORT

public static final java.lang.String HTTPPORT
See Also:
Constant Field Values

defaultProperties

public static java.lang.String defaultProperties
Constructor Detail

ConnectionBean

public ConnectionBean()
               throws java.lang.Exception
Creates an instance of ConnectinBean. The properties file must be configured in defaultProperties


ConnectionBean

public ConnectionBean(java.lang.String propertiesResource)
               throws java.lang.Exception

ConnectionBean

public ConnectionBean(java.util.Properties properties)
Method Detail

init

protected void init(java.util.Properties properties)
Initializes parameters.

attribute values default required meaning
Hostname yes Server hostname
Port 1099 no Server registry port
RemoteLocatorName yes Name of remote server reference
User no
Password no
SSL yes/no no no RMI with SSL
HTTP yes/no no no HHTP Tunneling.Sets NatRMIHTTPTunnelingSocketFactory as Socket factory.
Uses the system properties 'com.ontimize.util.rmitunneling.cgipath' and
'com.ontimize.util.rmitunneling.port'
CGIPATH no Overwrite the value of 'com.ontimize.util.rmitunneling.cgipath' system property.
This parameter will be used when the client connects to multiple servers.
HTTPPORT Overwrite the value of 'com.ontimize.util.rmitunneling.port' system property
This parameter will be used when the client connects to multiple servers.


removeRMISocketFactory

protected static void removeRMISocketFactory()

getSessionId

public int getSessionId()
                 throws java.lang.Exception
Throws:
java.lang.Exception

query

public EntityResult query(java.util.Hashtable keysValues,
                          java.util.Vector attributesValues,
                          java.lang.String entity)
                   throws java.lang.Exception
Executes a query against the server

Parameters:
keysValues - Filter to use in the query
attributesValues - Columns to query
entity - Name of the entity to query
Returns:
Throws:
java.lang.Exception

insert

public EntityResult insert(java.util.Hashtable attributesValues,
                           java.lang.String entity)
                    throws java.lang.Exception
Throws:
java.lang.Exception

update

public EntityResult update(java.util.Hashtable attributesValues,
                           java.util.Hashtable keysValues,
                           java.lang.String entity)
                    throws java.lang.Exception
Throws:
java.lang.Exception

delete

public EntityResult delete(java.util.Hashtable keysValues,
                           java.lang.String entity)
                    throws java.lang.Exception
Executes a delete operation against the server

Parameters:
keysValues - Filter to use in the operation
entity - Name of the entity
Returns:
Throws:
java.lang.Exception

getReferenceLocator

public EntityReferenceLocator getReferenceLocator()

getEntityReference

public Entity getEntityReference(java.lang.String entity)

getUser

public java.lang.String getUser()

endSession

public void endSession(int sessionId)
This method closes the specified session indicated in parameter.

Parameters:
sessionId - The session identifier
Since:
5.2061EN-0.7

Ontimize