fabric.worker.remote.messages
Class ReadMessage

java.lang.Object
  extended by fabric.messages.Message<RemoteWorker,R>
      extended by fabric.worker.remote.messages.InterWorkerMessage<ReadMessage.Response>
          extended by fabric.worker.remote.messages.ReadMessage

public class ReadMessage
extends InterWorkerMessage<ReadMessage.Response>

Represents a request from a worker to read an object owned by another worker.


Nested Class Summary
static class ReadMessage.Response
           
 
Nested classes/interfaces inherited from class fabric.messages.Message
Message.MessageType
 
Field Summary
 long onum
           
 Store store
           
 TransactionID tid
           
 
Fields inherited from class fabric.messages.Message
messageType
 
Constructor Summary
ReadMessage(java.io.DataInput in)
           
ReadMessage(TransactionID tid, Store store, long onum)
           
 
Method Summary
 ReadMessage.Response dispatch(MessageHandlerThread handler)
          Calls the appropriate handle(...) method on the handler.
 ReadMessage.Response response(RemoteWorker worker, java.io.DataInput in)
          Creates a Response message of the appropriate type using the provided input stream.
 ReadMessage.Response send(RemoteWorker remoteWorker)
           
 void write(java.io.DataOutput out)
          Writes this message out on the given output stream.
 
Methods inherited from class fabric.worker.remote.messages.InterWorkerMessage
readRef, writeRef
 
Methods inherited from class fabric.messages.Message
dispatch, receive, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tid

public final TransactionID tid

store

public final Store store

onum

public final long onum
Constructor Detail

ReadMessage

public ReadMessage(TransactionID tid,
                   Store store,
                   long onum)

ReadMessage

public ReadMessage(java.io.DataInput in)
            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

dispatch

public ReadMessage.Response dispatch(MessageHandlerThread handler)
                              throws ProtocolError
Description copied from class: Message
Calls the appropriate handle(...) method on the handler.

Overrides:
dispatch in class Message<RemoteWorker,ReadMessage.Response>
Returns:
the result computed by the handler
Throws:
ProtocolError

send

public ReadMessage.Response send(RemoteWorker remoteWorker)
                          throws UnreachableNodeException
Throws:
UnreachableNodeException

response

public ReadMessage.Response response(RemoteWorker worker,
                                     java.io.DataInput in)
                              throws java.io.IOException
Description copied from class: Message
Creates a Response message of the appropriate type using the provided input stream.

Specified by:
response in class Message<RemoteWorker,ReadMessage.Response>
Parameters:
worker - the remote node from which the response originated.
in - Input stream containing the message.
Returns:
A Response message with the appropriate type.
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Description copied from class: Message
Writes this message out on the given output stream. Only used by the worker.

Specified by:
write in class Message<RemoteWorker,ReadMessage.Response>
Throws:
java.io.IOException - if the output stream throws an IOException.