Package convex.net.message
Class MessageRemote
java.lang.Object
convex.net.message.Message
convex.net.message.MessageRemote
Message subclass handling return of results via a remote connection
-
Field Summary
Fields inherited from class convex.net.message.Message
log, messageData, payload, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMessageRemote(Connection conn, MessageType type, ACell payload, Blob data) -
Method Summary
Modifier and TypeMethodDescriptionvoidGets the Connection instance associated with this message, or null if no connection exists (presumably a local Message)Gets a String identifying the origin of the message.booleanreportResult(CVMLong id, ACell reply) booleanreportResult(Result res) Reports a result back to the originator of the message.booleanSends a cell of data to the connected PeerbooleansendMissingData(Hash hash) Returns a missing data request to the connected PeerwithConnection(Connection peerConnection) Methods inherited from class convex.net.message.Message
create, createBelief, createBeliefRequest, createChallenge, createData, createGoodBye, createMissingData, createMissingData, createResponse, createResult, createResult, getID, getMessageData, getPayload, getType, hasData, toString
-
Constructor Details
-
MessageRemote
-
-
Method Details
-
getConnection
Description copied from class:MessageGets the Connection instance associated with this message, or null if no connection exists (presumably a local Message)- Specified by:
getConnectionin classMessage- Returns:
- Connection instance
-
withConnection
-
reportResult
Reports a result back to the originator of the message. Will set a Result ID if necessary.- Specified by:
reportResultin classMessage- Parameters:
res- Result record- Returns:
- True if reported successfully, false otherwise
-
reportResult
-
getOriginString
Gets a String identifying the origin of the message. Used for logging.- Specified by:
getOriginStringin classMessage- Returns:
- String representing message origin
-
sendData
Description copied from class:MessageSends a cell of data to the connected Peer -
sendMissingData
Description copied from class:MessageReturns a missing data request to the connected Peer- Specified by:
sendMissingDatain classMessage- Parameters:
hash- Hash of missing data- Returns:
- True if request sent, false otherwise
-
closeConnection
public void closeConnection()- Specified by:
closeConnectionin classMessage
-