|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.client.OSRequest | +--ostore.client.OSCreateObjectRequest
An application uses the OSCreateObjectRequest
to
create a new data object in OceanStore. In response to this
request, the application will receive an
OSCreateObjectResult
. To create a new object, the
system requires four pieces of information: the principal's
public key, the principal's private key, the responsible party's
public key, and the desired name of the new data object.
The combination of the principal's public key, the responsible party's key, and the desired name of the new data object is called a responsible party certificate, or an RPCert. The principal's private key is used to sign the RPCert. The signed RPCert asserts that the signing principal elects to be represented by the given responsible party and requests that an object be created on its behalf.
The principal's private key is used only by the
ClientStage
to sign the RPCert. It is not
transmitted further to the system and is discarded after the
result of the request is known.
OSCreateObjectResult
Field Summary |
---|
Fields inherited from class ostore.client.OSRequest |
---|
app_id |
Constructor Summary | |
---|---|
OSCreateObjectRequest(InputBuffer buffer)
|
|
OSCreateObjectRequest(OSAppId app_id,
QSPublicKey principal_pkey,
QSPrivateKey principal_skey,
QSPublicKey rp_key,
String obj_name)
|
|
OSCreateObjectRequest(OSAppId app_id,
QSPublicKey principal_pkey,
QSPrivateKey principal_skey,
QSPublicKey rp_key,
String obj_name,
byte[] data)
|
|
OSCreateObjectRequest(OSAppId app_id,
QSPublicKey principal_pkey,
QSPrivateKey principal_skey,
QSPublicKey rp_key,
String obj_name,
Pair branch)
Create a new OSCreateObjectRequest . |
|
OSCreateObjectRequest(OSAppId app_id,
QSPublicKey principal_pkey,
QSPrivateKey principal_skey,
QSPublicKey rp_key,
String obj_name,
Pair branch,
byte[] data)
Create a new OSCreateObjectRequest and append some
initial data onto it immediately after creation.
|
Method Summary | |
---|---|
void |
appendInitialAction(OSAction action)
Append an action to the initial update list. |
SecureHash |
getAguid()
Returns the Aguid of the data object to be created. |
Pair |
getBranch()
|
SecureHash |
getBranchAGUID()
|
SecureHash |
getBranchVGUID()
|
QSArray |
getInitialUpdate()
Compile (if necessary) and return the initial_update action array for this create request. |
String |
getName()
Returns the desired name of the data object to be created. |
QSPrivateKey |
getPrincipalPrivateKey()
Returns the principal's private (secret) key. |
QSPublicKey |
getPrincipalPublicKey()
Returns the principal's public key. |
RPCert |
getRPCert()
Returns the responsible party certificate needed for this request. |
QSPublicKey |
getRPKey()
Returns the responsible party's public key. |
void |
serialize(OutputBuffer buffer)
Add the object to the buffer . |
String |
toString()
|
Methods inherited from class ostore.client.OSRequest |
---|
clone, getAppId, getDispatchTime, getSeqNum, getUserTag, setUserTag |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OSCreateObjectRequest(OSAppId app_id, QSPublicKey principal_pkey, QSPrivateKey principal_skey, QSPublicKey rp_key, String obj_name, Pair branch)
OSCreateObjectRequest
.
app_id
- the OSAppId
to identify the requesting
applicationprincipal_pkey
- the principal's public keyprincipal_skey
- the principal's private (secret) keyrp_key
- the responsible party's public keyobj_name
- the desired name of the new data objectpublic OSCreateObjectRequest(OSAppId app_id, QSPublicKey principal_pkey, QSPrivateKey principal_skey, QSPublicKey rp_key, String obj_name)
public OSCreateObjectRequest(OSAppId app_id, QSPublicKey principal_pkey, QSPrivateKey principal_skey, QSPublicKey rp_key, String obj_name, byte[] data)
public OSCreateObjectRequest(OSAppId app_id, QSPublicKey principal_pkey, QSPrivateKey principal_skey, QSPublicKey rp_key, String obj_name, Pair branch, byte[] data)
OSCreateObjectRequest
and append some
initial data onto it immediately after creation.
NOTE: please use the appendInitialAction() method instead.
app_id
- the OSAppId
to identify the requesting
applicationprincipal_pkey
- the principal's public keyprincipal_skey
- the principal's private (secret) keyrp_key
- the responsible party's public keyobj_name
- the desired name of the new data objectdata
- the initial data to appendpublic OSCreateObjectRequest(InputBuffer buffer) throws QSException
Method Detail |
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
serialize
in class OSRequest
buffer
- the output buffer to add the object topublic QSPublicKey getPrincipalPublicKey()
public QSPrivateKey getPrincipalPrivateKey()
public QSPublicKey getRPKey()
public String getName()
public SecureHash getAguid()
public RPCert getRPCert()
public String toString()
toString
in class Object
public void appendInitialAction(OSAction action)
FIXME: must know the aguid of the object to create the action... shouldn't need to.
FIXME: should disallow actions that don't target this object.
action
- the action to appendpublic QSArray getInitialUpdate()
public SecureHash getBranchVGUID()
public SecureHash getBranchAGUID()
public Pair getBranch()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |