net.handle.hdllib
Class RetrieveTxnResponse
java.lang.Object
net.handle.hdllib.AbstractMessage
net.handle.hdllib.AbstractResponse
net.handle.hdllib.RetrieveTxnResponse
public class RetrieveTxnResponse
- extends AbstractResponse
Response used to forward any new transactions to a replicated site/server.
This response is used for server<->server (or replicator<->server)
communication.
Fields inherited from class net.handle.hdllib.AbstractMessage |
authoritative, cacheCertify, certify, continuous, encodedMessage, encrypt, expiration, ignoreRestrictedValues, majorProtocolVersion, messageBody, minorProtocolVersion, 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, 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_NEED_RSAKEY_FOR_SESSIONEXCHANGE, RC_OPERATION_NOT_SUPPORTED, RC_OUT_OF_DATE_SITE_INFO, 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_TIMEOUT, RC_SUCCESS, RC_VALUE_ALREADY_EXISTS, RC_VALUES_NOT_FOUND, rdHashType, recursionCount, recursive, requestDigest, requestId, responseCode, returnRequestDigest, sessionId, signature, signerHdl, signerHdlIdx, siteInfoSerial |
Method Summary |
int |
processStreamedPart(TransactionCallback callback,
java.security.PublicKey sourceKey)
Process the incoming stream and call the given callback for every
transaction that is retrieved. |
void |
streamResponse(java.io.OutputStream outStream)
Write the response to the specified output stream. |
Methods inherited from class net.handle.hdllib.AbstractMessage |
clearBuffers, decryptMessage, encryptMessage, getEncodedMessage, getEncodedMessageBody, getResponseCodeMessage, hasEqualOrGreaterVersion, signMessage, signMessage, signMessage, takeValuesFrom, toString, verifyMessage, verifyMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NEED_TO_REDUMP
public static final int NEED_TO_REDUMP
- See Also:
- Constant Field Values
SENDING_TRANSACTIONS
public static final int SENDING_TRANSACTIONS
- See Also:
- Constant Field Values
keepAlive
public boolean keepAlive
req
public RetrieveTxnRequest req
txnQueue
public TransactionQueueInterface txnQueue
RetrieveTxnResponse
public RetrieveTxnResponse(TransactionQueueInterface txnQueue,
long nextTxnId,
RetrieveTxnRequest req,
boolean keepAlive,
HandleStorage storage,
java.security.PrivateKey sourcePrivKey)
throws HandleException
- Constructor for the server side.
- Throws:
HandleException
RetrieveTxnResponse
public RetrieveTxnResponse()
- Constructor for the client side.
processStreamedPart
public int processStreamedPart(TransactionCallback callback,
java.security.PublicKey sourceKey)
throws HandleException
- Process the incoming stream and call the given callback for every
transaction that is retrieved. The status codes that this function
can return include SENDING_TRANSACTIONS, or NEED_TO_REDUMP. If
NEED_TO_REDUMP is returned, all of the handles should be requested
from all of the servers in the primary site.
- Throws:
HandleException
streamResponse
public void streamResponse(java.io.OutputStream outStream)
throws HandleException
- Write the response to the specified output stream. This will
send all of the transactions 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