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
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMessageRemote(Connection conn, MessageType type, ACell payload) -
Method Summary
Modifier and TypeMethodDescriptionGets the Connection instance associated with this MessageGets a String identifying the origin of the message.booleanreportResult(CVMLong id, ACell reply)Report a result for a given message IDbooleanreportResult(Result res)Reports a result back to the originator of the message.booleanSends a cell of data to the connected PeerbooleansendMissingData(Hash hash)Sends a missing data request to the connected PeerwithConnection(Connection peerConnection)Methods inherited from class convex.net.message.Message
create, create, createBelief, createChallenge, createData, createGoodBye, createResponse, getErrorCode, getID, getPayload, getType, toString
-
Constructor Details
-
MessageRemote
-
-
Method Details
-
getConnection
Gets the Connection instance associated with this Message- Returns:
- Connection instance. May be null.
-
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
Description copied from class:MessageReport a result for a given message ID- Specified by:
reportResultin classMessage- Parameters:
id- Message IDreply- Value for result- Returns:
- True if reported successfully, false otherwise
-
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:MessageSends 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
-