edu.cmu.aura.service.db
Class DataSinkStub
java.lang.Object
|
+--edu.cmu.aura.service.rpc.GenericStub
|
+--edu.cmu.aura.service.db.DataSinkStub
- All Implemented Interfaces:
- DataSink, java.rmi.Remote
- public class DataSinkStub
- extends edu.cmu.aura.service.rpc.GenericStub
- implements DataSink
Provides an implementation of the DataSink
interface that may be used to update a database.
|
Constructor Summary |
DataSinkStub(edu.cmu.aura.service.rpc.RemoteReference dest)
|
DataSinkStub(java.lang.String hostName,
int port)
|
|
Method Summary |
void |
delete(java.lang.String serviceName,
java.util.ArrayList keyVal)
Delete an entry from the service database. |
void |
insert(java.lang.String serviceName,
java.util.ArrayList attribs)
Insert an entry into the service database. |
void |
update(java.lang.String serviceName,
java.util.ArrayList keyVal,
java.util.ArrayList attribs)
Update an entry's attributes in the service database. |
| Methods inherited from class edu.cmu.aura.service.rpc.GenericStub |
setDest |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSinkStub
public DataSinkStub(java.lang.String hostName,
int port)
DataSinkStub
public DataSinkStub(edu.cmu.aura.service.rpc.RemoteReference dest)
update
public void update(java.lang.String serviceName,
java.util.ArrayList keyVal,
java.util.ArrayList attribs)
throws ServiceException,
java.rmi.RemoteException
- Update an entry's attributes in the service database.
A new entry will be created if one matching the keyVal
is not found.
- Specified by:
update in interface DataSink
- Parameters:
serviceName - name of the service to updatekeyVal - key value of the entry to updateattribs - updated attributes
ServiceException
java.rmi.RemoteException
insert
public void insert(java.lang.String serviceName,
java.util.ArrayList attribs)
throws ServiceException,
java.rmi.RemoteException
- Insert an entry into the service database. An error will
occur if the entry already exists. When no entry exists,
this function has the same effect as calling update,
but requires one less argument.
- Specified by:
insert in interface DataSink
- Parameters:
serviceName - name of the service to insert intoattribs - updated attributes
ServiceException
java.rmi.RemoteException
delete
public void delete(java.lang.String serviceName,
java.util.ArrayList keyVal)
throws ServiceException,
java.rmi.RemoteException
- Delete an entry from the service database.
- Specified by:
delete in interface DataSink
- Parameters:
serviceName - name of the service to delete fromkeyVal - key value of entry to delete
ServiceException
java.rmi.RemoteException