Skip to content

Commit 1acc930

Browse files
committed
Make ServiceServerResponse serializable
1 parent 62405ea commit 1acc930

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/main/java/org/ros/internal/node/service/ServiceServerResponse.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
package org.ros.internal.node.service;
22

3+
import java.io.Serializable;
34
import java.nio.ByteBuffer;
45

56
/**
7+
* Response object returned from the service server upon completion of the service via client invocation.
8+
* The instance is sent as a byte payload which contains a bytebuffer with integer headers indicating
9+
* message size and error status presumably in support of UDP transport layer at some point.<p/>
10+
* These headers are extracted using a decoder, and then the payload that represents an instance of this object is
11+
* contained in the remainder of the byte payload and deserialized. The instance is sent on the event handling
12+
* internal bus, then multiplexed onto the TCP bus back to the client.
13+
* @author Jonathan Neville Groff (C) NeoCoreTechs 2020
614
*/
7-
class ServiceServerResponse {
8-
15+
class ServiceServerResponse implements Serializable {
16+
private static final long serialVersionUID = -5429450419100506243L;
917
private ByteBuffer message;
1018
private int errorCode;
1119
private int messageLength;
1220

21+
public ServiceServerResponse() {}
22+
1323
public void setErrorCode(int errorCode) {
1424
this.errorCode = errorCode;
1525
}

0 commit comments

Comments
 (0)