org.mpisws.p2p.transport.peerreview
Interface PeerReview<Handle extends RawSerializable,Identifier extends RawSerializable>
- All Superinterfaces:
- CertificateManager<Handle,Identifier>, Destructable, HashProvider, IdentityTransport<Handle,Identifier>, IdentityTransportCallback<Handle,Identifier>, PeerReviewConstants, StatusConstants, TransportLayer<Handle,java.nio.ByteBuffer>, TransportLayerCallback<Handle,java.nio.ByteBuffer>
- All Known Implementing Classes:
- PeerReviewImpl
public interface PeerReview<Handle extends RawSerializable,Identifier extends RawSerializable>
- extends IdentityTransportCallback<Handle,Identifier>, PeerReviewConstants, IdentityTransport<Handle,Identifier>
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 |
Method Summary |
boolean |
addAuthenticatorIfValid(AuthenticatorStore<Identifier> store,
Identifier subject,
Authenticator auth)
|
void |
challengeSuspectedNode(Handle h)
|
Authenticator |
extractAuthenticator(Identifier id,
long seq,
short entryType,
byte[] entryHash,
byte[] hTopMinusOne,
byte[] signature)
|
Authenticator |
extractAuthenticator(long seq,
short entryType,
byte[] entryHash,
byte[] hTopMinusOne,
byte[] signature)
|
PeerReviewCallback<Handle,Identifier> |
getApp()
|
AuthenticatorSerializer |
getAuthenticatorSerializer()
|
Environment |
getEnvironment()
|
long |
getEvidenceSeq()
|
EvidenceTool<Handle,Identifier> |
getEvidenceTool()
|
Serializer<Handle> |
getHandleSerializer()
|
int |
getHashSizeInBytes()
|
SecureHistory |
getHistory()
|
SecureHistoryFactory |
getHistoryFactory()
|
IdentifierExtractor<Handle,Identifier> |
getIdentifierExtractor()
|
Serializer<Identifier> |
getIdSerializer()
|
Handle |
getLocalHandle()
|
Identifier |
getLocalId()
|
RandomSource |
getRandomSource()
|
int |
getSignatureSizeInBytes()
|
long |
getTime()
Current time in millis, however, we depend on there being a timesource that is more discritized
than the "wall" clock. |
long |
getTimeToleranceMillis()
|
VerifierFactory<Handle,Identifier> |
getVerifierFactory()
|
boolean |
hasCertificate(Identifier id)
|
void |
init(java.lang.String dirname)
|
Cancellable |
requestCertificate(Handle source,
Identifier certHolder)
|
void |
sendEvidence(Handle destination,
Identifier evidenceAgainst)
|
void |
sendEvidenceToWitnesses(Identifier subject,
long timestamp,
Evidence evidence)
|
void |
setApp(PeerReviewCallback<Handle,Identifier> callback)
|
void |
transmit(Handle dest,
PeerReviewMessage message,
MessageCallback<Handle,java.nio.ByteBuffer> deliverAckToMe,
java.util.Map<java.lang.String,java.lang.Object> options)
|
boolean |
verify(Identifier subject,
Authenticator auth)
Throws exception if called w/o the cert for the subject |
RELEVANT_LENGTH
static final java.lang.String RELEVANT_LENGTH
- Option should map to an int < 255 to record the relevant length of the message.
- See Also:
- Constant Field Values
DONT_COMMIT
static final java.lang.String DONT_COMMIT
- -> Boolean, tell peer review to not bother committing this message. Don't sign it, log it, expect an ack
- See Also:
- Constant Field Values
PEER_REVIEW_PASSTHROUGH
static final byte PEER_REVIEW_PASSTHROUGH
- See Also:
- Constant Field Values
PEER_REVIEW_COMMIT
static final byte PEER_REVIEW_COMMIT
- See Also:
- Constant Field Values
extractAuthenticator
Authenticator extractAuthenticator(Identifier id,
long seq,
short entryType,
byte[] entryHash,
byte[] hTopMinusOne,
byte[] signature)
addAuthenticatorIfValid
boolean addAuthenticatorIfValid(AuthenticatorStore<Identifier> store,
Identifier subject,
Authenticator auth)
hasCertificate
boolean hasCertificate(Identifier id)
- Specified by:
hasCertificate
in interface CertificateManager<Handle extends RawSerializable,Identifier extends RawSerializable>
getEnvironment
Environment getEnvironment()
- Specified by:
getEnvironment
in interface IdentityTransport<Handle extends RawSerializable,Identifier extends RawSerializable>
getAuthenticatorSerializer
AuthenticatorSerializer getAuthenticatorSerializer()
getHandleSerializer
Serializer<Handle> getHandleSerializer()
getIdSerializer
Serializer<Identifier> getIdSerializer()
challengeSuspectedNode
void challengeSuspectedNode(Handle h)
getLocalId
Identifier getLocalId()
getLocalHandle
Handle getLocalHandle()
requestCertificate
Cancellable requestCertificate(Handle source,
Identifier certHolder)
extractAuthenticator
Authenticator extractAuthenticator(long seq,
short entryType,
byte[] entryHash,
byte[] hTopMinusOne,
byte[] signature)
transmit
void transmit(Handle dest,
PeerReviewMessage message,
MessageCallback<Handle,java.nio.ByteBuffer> deliverAckToMe,
java.util.Map<java.lang.String,java.lang.Object> options)
getTime
long getTime()
- Current time in millis, however, we depend on there being a timesource that is more discritized
than the "wall" clock. It is only advanced on a timeout or a message receipt.
- Returns:
getHashSizeInBytes
int getHashSizeInBytes()
getSignatureSizeInBytes
int getSignatureSizeInBytes()
getIdentifierExtractor
IdentifierExtractor<Handle,Identifier> getIdentifierExtractor()
getEvidenceSeq
long getEvidenceSeq()
sendEvidenceToWitnesses
void sendEvidenceToWitnesses(Identifier subject,
long timestamp,
Evidence evidence)
- Parameters:
subject
- the "bad" guytimestamp
- evidence
-
init
void init(java.lang.String dirname)
throws java.io.IOException
- Throws:
java.io.IOException
setApp
void setApp(PeerReviewCallback<Handle,Identifier> callback)
getApp
PeerReviewCallback<Handle,Identifier> getApp()
getEvidenceTool
EvidenceTool<Handle,Identifier> getEvidenceTool()
verify
boolean verify(Identifier subject,
Authenticator auth)
- Throws exception if called w/o the cert for the subject
- Parameters:
subject
- auth
-
- Returns:
getRandomSource
RandomSource getRandomSource()
getHistoryFactory
SecureHistoryFactory getHistoryFactory()
getVerifierFactory
VerifierFactory<Handle,Identifier> getVerifierFactory()
getHistory
SecureHistory getHistory()
getTimeToleranceMillis
long getTimeToleranceMillis()
sendEvidence
void sendEvidence(Handle destination,
Identifier evidenceAgainst)
Copyright © 2001-2005 - Rice Pastry.