net.handle.hdllib
Class DumpHandlesResponse

java.lang.Object
  extended by net.handle.hdllib.AbstractMessage
      extended by net.handle.hdllib.AbstractResponse
          extended by net.handle.hdllib.DumpHandlesResponse
All Implemented Interfaces:
java.lang.Cloneable

public class DumpHandlesResponse
extends AbstractResponse

Response used to send all handles in the database to a replicated site/server. This response is used for server<->server (or replicator<->server) communication.


Field Summary
static byte ABSOLUTELY_DONE_RECORD
           
static byte HANDLE_DATE_RECORD
           
static byte HANDLE_RECORD
           
static byte HOMED_PREFIX_RECORD
           
static byte NA_DATE_RECORD
           
static byte OTHER_SITE_REPLICATION_INFO_RECORD
           
 DumpHandlesRequest req
           
static byte THIS_SERVER_REPLICATION_INFO_RECORD
           
 
Fields inherited from class net.handle.hdllib.AbstractResponse
secureStream, socket, stream, streaming
 
Fields inherited from class net.handle.hdllib.AbstractMessage
authoritative, cacheCertify, certify, continuous, doNotRefer, encodedMessage, encrypt, expiration, ignoreRestrictedValues, keepAlive, majorProtocolVersion, messageBody, minorProtocolVersion, mintNewSuffix, OC_ADD_VALUE, OC_BACKUP_SERVER, OC_CREATE_HANDLE, OC_DELETE_HANDLE, OC_DUMP_HANDLES, OC_GET_NEXT_TXN_ID, OC_GET_SITE_INFO, OC_HOME_NA, OC_LIST_HANDLES, OC_LIST_HOMED_NAS, OC_MODIFY_VALUE, OC_REMOVE_VALUE, OC_RESERVED, OC_RESOLUTION, OC_RESPONSE_TO_CHALLENGE, OC_RETRIEVE_TXN_LOG, OC_SESSION_EXCHANGEKEY, OC_SESSION_SETUP, OC_SESSION_TERMINATE, OC_UNHOME_NA, OC_VERIFY_CHALLENGE, opCode, overwriteWhenExists, RC_AUTHEN_ERROR, RC_AUTHEN_TIMEOUT, RC_AUTHENTICATION_FAILED, RC_AUTHENTICATION_NEEDED, RC_ERROR, RC_HANDLE_ALREADY_EXISTS, RC_HANDLE_NOT_FOUND, RC_INSUFFICIENT_PERMISSIONS, RC_INVALID_ADMIN, RC_INVALID_CREDENTIAL, RC_INVALID_HANDLE, RC_INVALID_SESSION_KEY, RC_INVALID_SESSIONSETUP_REQUEST, RC_INVALID_VALUE, RC_NEED_RSAKEY_FOR_SESSIONEXCHANGE, RC_OPERATION_NOT_SUPPORTED, RC_OUT_OF_DATE_SITE_INFO, RC_PREFIX_REFERRAL, RC_PROTOCOL_ERROR, RC_RECURSION_COUNT_TOO_HIGH, RC_RESERVED, RC_SERVER_BACKUP, RC_SERVER_NOT_RESP, RC_SERVER_TOO_BUSY, RC_SERVICE_REFERRAL, RC_SESSION_FAILED, RC_SESSION_MESSAGE_REJECTED, RC_SESSION_TIMEOUT, RC_SUCCESS, RC_VALUE_ALREADY_EXISTS, RC_VALUES_NOT_FOUND, rdHashType, recursionCount, recursive, requestDigest, requestId, responseCode, returnRequestDigest, sessionCounter, sessionId, signature, signerHdl, signerHdlIdx, siteInfoSerial, suggestMajorProtocolVersion, suggestMinorProtocolVersion
 
Constructor Summary
DumpHandlesResponse()
          Constructor for the client side.
DumpHandlesResponse(DumpHandlesRequest req, HandleStorage storage, TransactionQueueInterface queue, ReplicationDaemonInterface replicationDaemon)
          Constructor for the server side.
 
Method Summary
 byte[] getLastProcessedRecord()
           
 byte getLastProcessedRecordType()
           
 void processStreamedPart(DumpHandlesCallback callback, java.security.PublicKey sourceKey)
          Process the incoming stream and call the given callback for every handle that is retrieved.
 void setLastProcessedRecord(byte[] lastProcessedRecord)
           
 void setLastProcessedRecordType(byte lastProcessedRecordType)
           
 void streamResponse(SignedOutputStream sout)
          Write the response to the specified output stream.
 
Methods inherited from class net.handle.hdllib.AbstractResponse
getContinuedResponse, takeDigestOfRequest
 
Methods inherited from class net.handle.hdllib.AbstractMessage
clearBuffers, clone, getEncodedMessage, getEncodedMessageBody, getResponseCodeMessage, hasEqualOrGreaterVersion, hasEqualOrGreaterVersion, setSupportedProtocolVersion, setSupportedProtocolVersion, setSupportedProtocolVersion, shouldEncrypt, signatureIsMac, signMessage, signMessage, takeValuesFrom, toString, verifyMessage, verifyMessage
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

req

public DumpHandlesRequest req

THIS_SERVER_REPLICATION_INFO_RECORD

public static final byte THIS_SERVER_REPLICATION_INFO_RECORD
See Also:
Constant Field Values

HANDLE_RECORD

public static final byte HANDLE_RECORD
See Also:
Constant Field Values

HOMED_PREFIX_RECORD

public static final byte HOMED_PREFIX_RECORD
See Also:
Constant Field Values

HANDLE_DATE_RECORD

public static final byte HANDLE_DATE_RECORD
See Also:
Constant Field Values

NA_DATE_RECORD

public static final byte NA_DATE_RECORD
See Also:
Constant Field Values

OTHER_SITE_REPLICATION_INFO_RECORD

public static final byte OTHER_SITE_REPLICATION_INFO_RECORD
See Also:
Constant Field Values

ABSOLUTELY_DONE_RECORD

public static final byte ABSOLUTELY_DONE_RECORD
See Also:
Constant Field Values
Constructor Detail

DumpHandlesResponse

public DumpHandlesResponse(DumpHandlesRequest req,
                           HandleStorage storage,
                           TransactionQueueInterface queue,
                           ReplicationDaemonInterface replicationDaemon)
                    throws HandleException
Constructor for the server side.

Throws:
HandleException

DumpHandlesResponse

public DumpHandlesResponse()
Constructor for the client side.

Method Detail

getLastProcessedRecordType

public byte getLastProcessedRecordType()

getLastProcessedRecord

public byte[] getLastProcessedRecord()

setLastProcessedRecordType

public void setLastProcessedRecordType(byte lastProcessedRecordType)

setLastProcessedRecord

public void setLastProcessedRecord(byte[] lastProcessedRecord)

processStreamedPart

public void processStreamedPart(DumpHandlesCallback callback,
                                java.security.PublicKey sourceKey)
                         throws HandleException
Process the incoming stream and call the given callback for every handle that is retrieved.

Throws:
HandleException

streamResponse

public void streamResponse(SignedOutputStream sout)
                    throws HandleException
Write the response to the specified output stream. This will send all of the handles that hash to the requestor beginning with the specified transaction ID. This method is typically called on the server side.

Overrides:
streamResponse in class AbstractResponse
Throws:
HandleException