|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mpisws.p2p.transport.peerreview.replay.playback.ReplayVerifier<Identifier>
public abstract class ReplayVerifier<Identifier>
| Field Summary | |
|---|---|
protected HashProvider |
hashProv
|
protected SecureHistory |
history
|
protected Identifier |
localHandle
|
protected Logger |
logger
|
protected Serializer<Identifier> |
serializer
|
| Fields inherited from interface org.mpisws.p2p.transport.peerreview.StatusConstants |
|---|
STATUS_EXPOSED, STATUS_SUSPECTED, STATUS_TRUSTED |
| Constructor Summary | |
|---|---|
ReplayVerifier(Serializer<Identifier> serializer,
HashProvider hashProv,
SecureHistory history,
Identifier localHandle,
short signatureSizeBytes,
short hashSizeBytes,
int firstEntryToReplay,
Logger logger)
|
|
| Method Summary | |
|---|---|
void |
close(int socketId)
|
protected java.io.IOException |
deserializeException(InputBuffer nextEvent)
|
protected void |
fetchNextEvent()
Fetch the next log entry, or set the EOF flag |
void |
generatedSocketException(int socketId,
java.io.IOException ioe)
|
IndexEntry |
getNextEvent()
|
long |
getNextEventTime()
|
protected abstract void |
incomingSocket(Identifier from,
int socketId)
Callback when a socket comes in from a remote node. |
boolean |
isSuccess()
|
boolean |
makeProgress()
This is called by the Audit protocol to make another replay step; it returns true if further calls are necessary, and false if the replay has finished. |
int |
openSocket(Identifier target)
Return the new socketId |
int |
readSocket(int socketId,
java.nio.ByteBuffer dst)
Return the bytes read. |
protected abstract void |
receive(Identifier from,
java.nio.ByteBuffer msg)
Callback when a message has arrived. |
void |
registerEvent(EventCallback callback,
short... eventType)
This binds specific event types to one of the handlers |
void |
registerEvent(EventCallback callback,
short eventType)
|
protected void |
send(Identifier target,
java.nio.ByteBuffer message,
int relevantLen)
Called by the state machine when it wants to send a message |
void |
setApplication(PeerReviewCallback app)
|
void |
shutdownOutput(int socketId)
|
protected abstract void |
socketException(int socketId,
java.io.IOException ioe)
|
protected abstract void |
socketIO(int socketId,
boolean canRead,
boolean canWrite)
Callback when a socket is ready to read/write. |
protected abstract void |
socketOpened(int socketId)
|
boolean |
verifiedOK()
|
int |
writeSocket(int socketId,
java.nio.ByteBuffer src)
Return the bytes written. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mpisws.p2p.transport.peerreview.replay.Verifier |
|---|
getEnvironment |
| Methods inherited from interface org.mpisws.p2p.transport.TransportLayer |
|---|
acceptMessages, acceptSockets, getLocalIdentifier, openSocket, sendMessage, setCallback, setErrorHandler |
| Methods inherited from interface rice.Destructable |
|---|
destroy |
| Field Detail |
|---|
protected Identifier localHandle
protected SecureHistory history
protected Logger logger
protected Serializer<Identifier> serializer
protected HashProvider hashProv
| Constructor Detail |
|---|
public ReplayVerifier(Serializer<Identifier> serializer,
HashProvider hashProv,
SecureHistory history,
Identifier localHandle,
short signatureSizeBytes,
short hashSizeBytes,
int firstEntryToReplay,
Logger logger)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public boolean verifiedOK()
verifiedOK in interface Verifier<Identifier>public IndexEntry getNextEvent()
protected abstract void receive(Identifier from,
java.nio.ByteBuffer msg)
throws java.io.IOException
from - msg -
java.io.IOException
protected abstract void incomingSocket(Identifier from,
int socketId)
throws java.io.IOException
from - socketId -
java.io.IOException
protected abstract void socketIO(int socketId,
boolean canRead,
boolean canWrite)
throws java.io.IOException
socketId - canRead - canWrite -
java.io.IOException
protected abstract void socketOpened(int socketId)
throws java.io.IOException
java.io.IOException
protected abstract void socketException(int socketId,
java.io.IOException ioe)
throws java.io.IOException
java.io.IOExceptionpublic void setApplication(PeerReviewCallback app)
setApplication in interface Verifier<Identifier>protected void fetchNextEvent()
protected void send(Identifier target,
java.nio.ByteBuffer message,
int relevantLen)
throws java.io.IOException
java.io.IOException
public int openSocket(Identifier target)
throws java.io.IOException
i -
java.io.IOException
public int readSocket(int socketId,
java.nio.ByteBuffer dst)
throws java.io.IOException
socketId -
java.io.IOException
public void generatedSocketException(int socketId,
java.io.IOException ioe)
public int writeSocket(int socketId,
java.nio.ByteBuffer src)
throws java.io.IOException
socketId -
java.io.IOExceptionpublic void close(int socketId)
public void shutdownOutput(int socketId)
public void registerEvent(EventCallback callback,
short... eventType)
public void registerEvent(EventCallback callback,
short eventType)
public boolean makeProgress()
makeProgress in interface Verifier<Identifier>public long getNextEventTime()
getNextEventTime in interface Verifier<Identifier>public boolean isSuccess()
isSuccess in interface Verifier<Identifier>
protected java.io.IOException deserializeException(InputBuffer nextEvent)
throws java.io.IOException
java.io.IOException
|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||