|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjava.rmi.server.RemoteObject
org.jagent.service.util.RMIBasicService
com.ibm.able.platform.AbleBasicService
com.ibm.able.platform.RmiPlatformPersistenceSystem
Whee, after all those interfaces and proxies, here is the real, nitty-gritty implementation of an RMI-based Platform Persistence Service.
| Field Summary |
|---|
| Fields inherited from class com.ibm.able.platform.AbleBasicService |
|---|
ANS_PRINCIPAL, LOCAL_PRINCIPAL, myAnsPrincipal, myKeyPair, myMsgLog, myPrincipal, mySecSppt, myServiceEventListeners, myServiceProperties, myTrcLog, myTrustLevel, myVerifiableAgentName, myVerifiableNamingService, Refreshing, REQUESTORS_PORT, Running, SOCKET_FACTORY, Terminated, Unknown |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Fields inherited from interface org.jagent.service.RMIService |
|---|
RMI, SERVICE_PROTOCOL |
| Fields inherited from interface org.jagent.service.IPService |
|---|
SERVICE_HOST, SERVICE_PORT |
| Constructor Summary | |
|---|---|
RmiPlatformPersistenceSystem()
Create an instance of an RMI-based Platform Persistence Service. |
|
RmiPlatformPersistenceSystem(javax.agent.service.ServiceProperties theServiceProperties)
Create an instance of an RMI-based Platform Persistence Service, using the specified service properties. |
|
| Method Summary | |
|---|---|
void |
close(java.lang.String databaseName,
java.lang.String tableName,
AbleSecureKey key)
Closes all connections, both the AbleDBImport and AbleDBExport beans for this database table. |
void |
createTableConnection(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String schema,
java.lang.String[] columnNames,
java.lang.String[] columnTypes,
AbleSecureKey key,
boolean writeOnly)
This creates an AbleDBExport and optionally an AbleDBImport bean and the table these beans will be dealing with if the table does not already exist. |
void |
delete(java.lang.String databaseName,
java.lang.String tableName,
java.lang.Object whereObject,
AbleSecureKey key)
Deletes rows from a table. |
java.lang.String |
getBindingName()
|
void |
insert(java.lang.String databaseName,
java.lang.String tableName,
java.io.Serializable[] insertData,
AbleSecureKey key)
Insert a record into a table. |
java.lang.Object[] |
select(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String columnString,
java.lang.String whereString,
AbleSecureKey key)
Selects data from a table. |
void |
terminateService(AbleSecureKey key)
Secure method that will take down the PPS nicely. |
void |
update(java.lang.String databaseName,
java.lang.String tableName,
java.util.Map updateMap,
java.util.Map whereMap,
AbleSecureKey key)
Updates a row in a table. |
| Methods inherited from class com.ibm.able.platform.AbleBasicService |
|---|
addAblePlatformServiceEventListener, getAblePlatformServiceEventListeners, getState, notifyAblePlatformServiceEventListeners, removeAblePlatformServiceEventListener, setState, thenNotifyAblePlatformServiceEventListeners |
| Methods inherited from class org.jagent.service.util.RMIBasicService |
|---|
bindServiceToRegistry, getServiceProperties, setServiceProperties, shutdown |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ibm.able.platform.RmiAblePlatformService |
|---|
getState |
| Methods inherited from interface com.ibm.able.platform.RmiAblePlatformServiceEventGenerator |
|---|
addAblePlatformServiceEventListener, getAblePlatformServiceEventListeners, removeAblePlatformServiceEventListener |
| Constructor Detail |
public RmiPlatformPersistenceSystem()
throws java.lang.Exception
public RmiPlatformPersistenceSystem(javax.agent.service.ServiceProperties theServiceProperties)
throws java.lang.Exception
theServiceProperties - Service properties on which the service is based.
| Method Detail |
public void terminateService(AbleSecureKey key)
throws AbleException,
javax.agent.service.naming.NamingException
terminateService in interface RmiAblePlatformServiceterminateService in class AbleBasicServicekey - The key that is used to secure this communication
AbleException - On errors verifying the key when the platform is secure.
If the caller is not authorized to make this call.
On any errors calling quitAll on the AbleDBExport and AbleDBImport beans.
On errors terminating the PlatformPersistenceService.
javax.agent.service.naming.NamingException - On errors generating a secureKey used to terminate the PlatformPersistenceService.public java.lang.String getBindingName()
public void createTableConnection(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String schema,
java.lang.String[] columnNames,
java.lang.String[] columnTypes,
AbleSecureKey key,
boolean writeOnly)
throws AbleException,
java.rmi.RemoteException,
PlatformPersistenceException
RmiPlatformPersistenceService
createTableConnection in interface RmiPlatformPersistenceServicedatabaseName - The name of the Database that the table will exist in.
tableName - The name of the table.
schema - The schema for this table.
columnNames - String[] containing the name of each column for this table.
columnTypes - String[] containing the type of each column for this table.
key - AbleSecureKey used to secure communication.
writeOnly - When true, the service is output only.
PlatformPersistenceException - If unable to verify the key when the platform is secure.
If databaseName is null.
If tableName is null.
If columnNames is null.
If columnTypes is null.
If columnTypes and columnNames are of different lengths.
On errors creating the table.
java.rmi.RemoteException - On all remote errors.
AbleException
public void insert(java.lang.String databaseName,
java.lang.String tableName,
java.io.Serializable[] insertData,
AbleSecureKey key)
throws java.rmi.RemoteException,
PlatformPersistenceException,
AbleException
RmiPlatformPersistenceService
insert in interface RmiPlatformPersistenceServicedatabaseName - The name of the Database that the table will exist in.
tableName - The name of the table to insert into.
insertData - Serializable[] containing the data that is to be inserted into the table.
key - AbleSecureKey used to secure communication.
PlatformPersistenceException - If the insertData is null.
If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
If the table connection does not exist.
java.rmi.RemoteException - On all remote errors.
AbleException
public void update(java.lang.String databaseName,
java.lang.String tableName,
java.util.Map updateMap,
java.util.Map whereMap,
AbleSecureKey key)
throws java.rmi.RemoteException,
PlatformPersistenceException
RmiPlatformPersistenceService
update in interface RmiPlatformPersistenceServicedatabaseName - The name of the Database that the table will exist in.
tableName - The name of the table.
updateMap - This is the new data for the record that is to be updated. In this map the
keys are the column names and the values are the column values. The columns
that are not changing do not have to be present.
whereMap - This determines the where clause for the update statement. This Map will be
used to build the where clause. The keys will be the column names, and the
values will be the Object to match to for their respective column. If left null,
or empty, everything will be deleted.
key - AbleSecureKey used to secure communication
java.rmi.RemoteException - On all remote errors.
PlatformPersistenceException - If the updateMap is null.
If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
If the table connection does not exist.
public void delete(java.lang.String databaseName,
java.lang.String tableName,
java.lang.Object whereObject,
AbleSecureKey key)
throws java.rmi.RemoteException,
PlatformPersistenceException
RmiPlatformPersistenceService
delete in interface RmiPlatformPersistenceServicedatabaseName - The name of the database that the table will exist in.
tableName - The name of the table.
whereObject - This can either be a simple String that states the where clause of
the delete, or a Map that will be used to build the where clause.
The keys will be the column names, and the values will be the Object
to match to for their respective column. If left null, or not a String
or Map, everything will be deleted.
key - AbleSecureKey used to secure communication
java.rmi.RemoteException - On all remote errors.
PlatformPersistenceException - If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
If the table connection does not exist.
public java.lang.Object[] select(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String columnString,
java.lang.String whereString,
AbleSecureKey key)
throws AbleException,
java.rmi.RemoteException,
PlatformPersistenceException
RmiPlatformPersistenceService
select in interface RmiPlatformPersistenceServicedatabaseName - The name of the database that the table will exist in.
tableName - The name of the table.
columnString - The columns that are to be returned in a select statement.
If left blank or null, all columns will be returned.
whereString - The where string of the select statement. If left blank or null,
everything will be returned.
key - AbleSecureKey used to secure communication.
java.rmi.RemoteException - On all remote errors.
PlatformPersistenceException - If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
If the table connection does not exist.
On errors deserializing a Blob.
If the persisted data selected is not of a valid type.
AbleException
public void close(java.lang.String databaseName,
java.lang.String tableName,
AbleSecureKey key)
throws AbleException,
java.rmi.RemoteException,
PlatformPersistenceException
RmiPlatformPersistenceService
close in interface RmiPlatformPersistenceServicedatabaseName - The name of the DB that the table will exist in.
tableName - The name of the table.
key - AbleSecureKey used to secure communication.
java.rmi.RemoteException - On all remote errors.
PlatformPersistenceException - If unable to verify the key when the platform is secure.
If secure and the caller is not the one who originally set up the connection to this table.
If the table connection does not exist.
AbleException
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||