Rice Pastry API

org.mpisws.p2p.transport.peerreview.challenge
Class ChallengeResponseProtocolImpl<Handle extends RawSerializable,Identifier extends RawSerializable>

java.lang.Object
  extended by org.mpisws.p2p.transport.peerreview.challenge.ChallengeResponseProtocolImpl<Handle,Identifier>
All Implemented Interfaces:
ChallengeResponseProtocol<Handle,Identifier>, StatusChangeListener<Identifier>, PeerReviewConstants, StatusConstants

public class ChallengeResponseProtocolImpl<Handle extends RawSerializable,Identifier extends RawSerializable>
extends java.lang.Object
implements PeerReviewConstants, ChallengeResponseProtocol<Handle,Identifier>


Field Summary
protected  Logger logger
           
 
Fields inherited from interface org.mpisws.p2p.transport.peerreview.PeerReviewConstants
AUTH_CACHE_INTERVAL, CERT_MISSING, CHAL_AUDIT, CHAL_SEND, DEFAULT_AUDIT_INTERVAL_MILLIS, DEFAULT_AUTH_PUSH_INTERVAL_MILLIS, DEFAULT_CHECKPOINT_INTERVAL_MILLIS, DEFAULT_LOG_DOWNLOAD_TIMEOUT, DEFAULT_TIME_TOLERANCE_MILLIS, EVT_ACK, EVT_CHECKPOINT, EVT_CHOOSE_Q, EVT_CHOOSE_RAND, EVT_INIT, EVT_MAX_RESERVED, EVT_MAX_SOCKET_EVT, EVT_MIN_SOCKET_EVT, EVT_RECV, EVT_SEND, EVT_SENDSIGN, EVT_SIGN, EVT_SOCKET_CAN_READ, EVT_SOCKET_CAN_RW, EVT_SOCKET_CAN_WRITE, EVT_SOCKET_CLOSE, EVT_SOCKET_CLOSED, EVT_SOCKET_EXCEPTION, EVT_SOCKET_OPEN_INCOMING, EVT_SOCKET_OPEN_OUTGOING, EVT_SOCKET_OPENED_OUTGOING, EVT_SOCKET_READ, EVT_SOCKET_SHUTDOWN_OUTPUT, EVT_SOCKET_WRITE, EVT_VRF, EX_TYPE_ClosedChannel, EX_TYPE_IO, EX_TYPE_Unknown, FLAG_FULL_MESSAGES_ALL, FLAG_FULL_MESSAGES_SENDER, FLAG_INCLUDE_CHECKPOINT, INVALID, INVESTIGATION_INTERVAL_MILLIS, MAINTENANCE_INTERVAL_MILLIS, MAX_ACTIVE_AUDITS, MAX_ACTIVE_INVESTIGATIONS, MAX_ENTRIES_BETWEEN_CHECKPOINTS, MAX_STATUS_INFO, MAX_WITNESSED_NODES, MSG_ACCUSATION, MSG_ACK, MSG_AUTHPUSH, MSG_AUTHREQ, MSG_AUTHRESP, MSG_CHALLENGE, MSG_RESPONSE, MSG_USERDATA, MSG_USERDGRAM, NO_CERTIFICATE, PROGRESS_INTERVAL_MILLIS, PROOF_INCONSISTENT, PROOF_NONCONFORMANT, RESP_AUDIT, RESP_SEND, SIGNATURE_BAD, SIGNATURE_OK, STATE_SEND_AUDIT, STATE_WAIT_FOR_LOG, TI_AUTH_PUSH, TI_CHECKPOINT, TI_MAINTENANCE, TI_MAKE_PROGRESS, TI_MAX_RESERVED, TI_START_AUDITS, TI_STATUS_INFO, VALID
 
Fields inherited from interface org.mpisws.p2p.transport.peerreview.StatusConstants
STATUS_EXPOSED, STATUS_SUSPECTED, STATUS_TRUSTED
 
Constructor Summary
ChallengeResponseProtocolImpl(PeerReviewImpl<Handle,Identifier> peerReviewImpl, IdentityTransport<Handle,Identifier> transport, PeerInfoStore<Handle,Identifier> infoStore, SecureHistory history, AuthenticatorStore<Identifier> authOutStore, AuditProtocol<Handle,Identifier> auditProtocol, CommitmentProtocol<Handle,Identifier> commitmentProtocol)
           
 
Method Summary
 void challengeSuspectedNode(Handle target)
          Looks up the first unanswered challenge to a SUSPECTED node, and sends it to that node
protected  void copyAndEnqueueTail(Handle source, Evidence evidence, boolean isAccusation, Identifier subject, Identifier originator, long evidenceSeq, java.util.Map<java.lang.String,java.lang.Object> options)
           
protected  void deliver(PacketInfo<Handle,Identifier> pi)
           
 void handleChallenge(Handle source, ChallengeMessage<Identifier> challenge, java.util.Map<java.lang.String,java.lang.Object> options)
          Called when another node sends us a challenge.
 void handleIncomingMessage(Handle source, UserDataMessage<Handle> message, java.util.Map<java.lang.String,java.lang.Object> options)
           
protected  void handleResponse(ResponseMessage<Identifier> message, java.util.Map<java.lang.String,java.lang.Object> options)
           
 void handleStatement(Handle source, PeerReviewMessage m, java.util.Map<java.lang.String,java.lang.Object> options)
          Handle an incoming RESPONSE or ACCUSATION from another node
 void notifyStatusChange(Identifier id, int newStatus)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger
Constructor Detail

ChallengeResponseProtocolImpl

public ChallengeResponseProtocolImpl(PeerReviewImpl<Handle,Identifier> peerReviewImpl,
                                     IdentityTransport<Handle,Identifier> transport,
                                     PeerInfoStore<Handle,Identifier> infoStore,
                                     SecureHistory history,
                                     AuthenticatorStore<Identifier> authOutStore,
                                     AuditProtocol<Handle,Identifier> auditProtocol,
                                     CommitmentProtocol<Handle,Identifier> commitmentProtocol)
Method Detail

copyAndEnqueueTail

protected void copyAndEnqueueTail(Handle source,
                                  Evidence evidence,
                                  boolean isAccusation,
                                  Identifier subject,
                                  Identifier originator,
                                  long evidenceSeq,
                                  java.util.Map<java.lang.String,java.lang.Object> options)

deliver

protected void deliver(PacketInfo<Handle,Identifier> pi)

notifyStatusChange

public void notifyStatusChange(Identifier id,
                               int newStatus)
Specified by:
notifyStatusChange in interface StatusChangeListener<Identifier extends RawSerializable>

handleChallenge

public void handleChallenge(Handle source,
                            ChallengeMessage<Identifier> challenge,
                            java.util.Map<java.lang.String,java.lang.Object> options)
                     throws java.io.IOException
Called when another node sends us a challenge. If the challenge is valid, we respond.

Specified by:
handleChallenge in interface ChallengeResponseProtocol<Handle extends RawSerializable,Identifier extends RawSerializable>
Throws:
java.io.IOException

handleResponse

protected void handleResponse(ResponseMessage<Identifier> message,
                              java.util.Map<java.lang.String,java.lang.Object> options)
                       throws java.io.IOException
Throws:
java.io.IOException

handleStatement

public void handleStatement(Handle source,
                            PeerReviewMessage m,
                            java.util.Map<java.lang.String,java.lang.Object> options)
                     throws java.io.IOException
Handle an incoming RESPONSE or ACCUSATION from another node

Specified by:
handleStatement in interface ChallengeResponseProtocol<Handle extends RawSerializable,Identifier extends RawSerializable>
Throws:
java.io.IOException

challengeSuspectedNode

public void challengeSuspectedNode(Handle target)
Looks up the first unanswered challenge to a SUSPECTED node, and sends it to that node

Specified by:
challengeSuspectedNode in interface ChallengeResponseProtocol<Handle extends RawSerializable,Identifier extends RawSerializable>

handleIncomingMessage

public void handleIncomingMessage(Handle source,
                                  UserDataMessage<Handle> message,
                                  java.util.Map<java.lang.String,java.lang.Object> options)
                           throws java.io.IOException
Specified by:
handleIncomingMessage in interface ChallengeResponseProtocol<Handle extends RawSerializable,Identifier extends RawSerializable>
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection