com.sentilla.net.rpc.procedures
Class RemoteSetProperty

java.lang.Object
  extended by com.sentilla.net.rpc.procedures.RemoteSetProperty
All Implemented Interfaces:
Procedure<RemoteSetProperty.Result>, Serializable
Direct Known Subclasses:
RemoteSetPropertyBytes, RemoteSetPropertyObject

public abstract class RemoteSetProperty
extends Object
implements Procedure<RemoteSetProperty.Result>

Private: for Sentilla internal use only. Abstract class for Procedures that write data into remote properties. Constructors are provided with and without a reserved data length. When no data length is specified, the action will only succeed when the property exists remotely. RemoteSetProperty.Result indicates target and seek position of the set, and implicitely means the set was successful at that target. Failure is indicated by platform-specific exceptions or lack of response.

See Also:
Serialized Form

Nested Class Summary
static class RemoteSetProperty.Result
          Private: for Sentilla internal use only.
 
Field Summary
 byte[] keybytes
           
 byte len
           
 byte seek
           
 
Constructor Summary
protected RemoteSetProperty(String key, int seek)
          The open-only mode.
protected RemoteSetProperty(String key, int seek, int len)
          The open-or-create mode.
 
Method Summary
protected  com.sentilla.io.RandomAccessFile getRaf()
          Open the property (creating if appropraite) and seek to start position.
protected  RemoteSetProperty.Result newResult(com.sentilla.io.RandomAccessFile raf)
          Create and initialize a Result indicating the local address and the number of bytes written.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sentilla.net.rpc.Procedure
run
 

Field Detail

seek

public byte seek

keybytes

public byte[] keybytes

len

public byte len
Constructor Detail

RemoteSetProperty

protected RemoteSetProperty(String key,
                            int seek,
                            int len)
The open-or-create mode.


RemoteSetProperty

protected RemoteSetProperty(String key,
                            int seek)
The open-only mode.

Method Detail

getRaf

protected com.sentilla.io.RandomAccessFile getRaf()
Open the property (creating if appropraite) and seek to start position.

Returns:
RandomAccessFile if successfully opened
Throws:
IORuntimeException - (platform-specific) if open or seek fail.

newResult

protected RemoteSetProperty.Result newResult(com.sentilla.io.RandomAccessFile raf)
Create and initialize a Result indicating the local address and the number of bytes written.

Returns:
Result


Copyright © 2007 Sentilla Corporation. All Rights Reserved.