public class ConnectionBean extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CGIPATH |
static String |
defaultProperties |
static String |
HTTP |
static String |
HTTPPORT |
static String |
HTTPS |
static String |
PASSWORD |
static String |
PORT |
static String |
REMOTE_LOCATOR_NAME |
static String |
SERVER_HOSTNAME |
static String |
SSL |
static String |
USER |
| Constructor and Description |
|---|
ConnectionBean()
Creates an instance of
ConnectinBean. |
ConnectionBean(Properties properties) |
ConnectionBean(String propertiesResource) |
| Modifier and Type | Method and Description |
|---|---|
EntityResult |
delete(Hashtable keysValues,
String entity)
Executes a delete operation against the server
|
void |
endSession(int sessionId)
This method closes the specified session indicated in parameter.
|
Entity |
getEntityReference(String entity) |
EntityReferenceLocator |
getReferenceLocator() |
int |
getSessionId() |
String |
getUser() |
protected void |
init(Properties properties)
Initializes parameters.
|
EntityResult |
insert(Hashtable attributesValues,
String entity) |
EntityResult |
query(Hashtable keysValues,
Vector attributesValues,
String entity)
Executes a query against the server
|
protected static void |
removeRMISocketFactory() |
EntityResult |
update(Hashtable attributesValues,
Hashtable keysValues,
String entity) |
public static final String PORT
public static final String SERVER_HOSTNAME
public static final String REMOTE_LOCATOR_NAME
public static final String USER
public static final String PASSWORD
public static final String SSL
public static final String HTTP
public static final String HTTPS
public static final String CGIPATH
public static final String HTTPPORT
public static String defaultProperties
public ConnectionBean()
throws Exception
ConnectinBean. The properties file
must be configured in defaultPropertiesExceptionpublic ConnectionBean(Properties properties)
protected void init(Properties properties)
| 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. |
parameters - the Properties with parameters.protected static void removeRMISocketFactory()
public EntityResult query(Hashtable keysValues, Vector attributesValues, String entity) throws Exception
keysValues - Filter to use in the queryattributesValues - Columns to queryentity - Name of the entity to queryExceptionpublic EntityResult insert(Hashtable attributesValues, String entity) throws Exception
Exceptionpublic EntityResult update(Hashtable attributesValues, Hashtable keysValues, String entity) throws Exception
Exceptionpublic EntityResult delete(Hashtable keysValues, String entity) throws Exception
keysValues - Filter to use in the operationentity - Name of the entityExceptionpublic EntityReferenceLocator getReferenceLocator()
public String getUser()
public void endSession(int sessionId)
sessionId - The session identifierCopyright © 2016 Imatia Innovation S.L.. All rights reserved.