Was this helpful?
com.ca.openroad.SerialRemoteServer
The Java SerialRemoteServer class wraps a corresponding instance of the OpenROAD.SerialRemoteServer COM class. This is used only in the HTTP gatekeeper web server application.
This class has the following characteristics:
All methods are synchronized and final.
All methods throw COMException, except for the release method.
The default constructor takes no arguments and creates an underlying COM SerialRemoteServer instance that is not connected.
The following table describes the wrappers:
Wrapper
Description
void release(); // does not throw
Releases the underlying COM SerialRemoteServer instance. After the release method is called, the Java object instance becomes essentially useless and should be discarded.
void connect(String akaName, String location, String routing);
Connects the SRS using the NameServer. Both location and routing are optional and can be passed as null references or empty strings.
void attachRSO(RemoteServer rso);
Allows an existing RSO instance to be used as the underlying RSO for the SRS. The RSO parameter must be a Java RemoteServer instance that is already connected. There is no transfer of ownership of underlying COM resources. The RSO instance must still have release called on it independently of the SRS.
void disconnect();
Disconnects the SRS
void passThruCallProc(String procName, ParameterData byValPDO, ParameterData byRefPDO);
Invokes a callProc on the underlying RemoteServer instance. Both byValPDO and byRefPDO are optional and can be passed as null references.
boolean isConnected();
Indicates whether the SRS is connected
int decodeMessageType(byte[] message);
Decodes just enough of a request message to determine its type
InitiateRequest decodeInitiateRequest(byte[] message);
Decodes an InitiateRequest message
Call4GLRequestHeader decodeCall4GLRequestHeader(byte[] message);
Decodes just the header (authentication token and procedure name) of a Call4GLRequest message
DisconnectRequest decodeDisconnectRequest(byte[] message);
Decodes a DisconnectRequest message
byte[] serialCall4GL(byte[] message);
Takes a Call4GLRequest message as input, processes it, and returns a Call4GLResponse message
byte[] encodeInitiateResponse(String authToken);
Encodes an InitiateResponse message
byte[] encodeDisconnectResponse();
Encodes a DisconnectResponse message
byte[] ecodeErrorResponse(int hresult, String guid, String source, String description);
Encodes an ErrorResponse message
Helper Classes for SerialRemoteServer
The following classes are public structures that allow the DecodeXXX methods of the SerialRemoteServer class to return multiple strings as a single return value from the method.
public final class InitiateRequest
{
    public String appInfo;
    public String user;
    public String password;
 }
public final class Call4GLRequestHeader
{
    public String authToken;
    public String procName;
 }
public final class DisconnectRequest
{
    public String authToken;
Last modified date: 12/20/2023