com.distinct.rpc
Class ClientTCPStreamed

java.lang.Object
  |
  +--com.distinct.rpc.ClientGeneric
        |
        +--com.distinct.rpc.ClientTCP
              |
              +--com.distinct.rpc.ClientTCPStreamed
All Implemented Interfaces:
java.io.Serializable

public class ClientTCPStreamed
extends ClientTCP

Implementation of the RPC protocol via TCP.

See Also:
ClientGeneric, Serialized Form

Constructor Summary
ClientTCPStreamed(java.net.InetAddress host, int prog, int vers, int rsize)
          Creates a new streamed TCP protocol object.
ClientTCPStreamed(java.net.InetAddress host, int prog, int vers, int port, int rsize)
          Creates a new streamed TCP protocol object and connects it to a server with a known port.
 
Method Summary
 void Call(int prog, int vers, int proc, XDRType in, XDRType out)
          Calls the server.
 
Methods inherited from class com.distinct.rpc.ClientTCP
close, setResend, setsock_opt, setTimeout
 
Methods inherited from class com.distinct.rpc.ClientGeneric
Call, getReturnedVerifier, setCredential, setVerifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientTCPStreamed

public ClientTCPStreamed(java.net.InetAddress host,
                         int prog,
                         int vers,
                         int port,
                         int rsize)
                  throws java.io.IOException
Creates a new streamed TCP protocol object and connects it to a server with a known port. (No interaction with a portmapper)
Parameters:
host - The host on which the server lives.
prog - The program ID of the server as defined in the .x IDL file.
vers - The program version of the server as defined in the .x IDL file.
port - The port on which the server listens.
Throws:
java.io.IOException - When the socket could not be opened.

ClientTCPStreamed

public ClientTCPStreamed(java.net.InetAddress host,
                         int prog,
                         int vers,
                         int rsize)
                  throws RPCError,
                         java.io.IOException
Creates a new streamed TCP protocol object. Calls the portmapper to get the port information.
Parameters:
host - The host on which the server lives. In an applet this must be the host where the applet comes from.
prog - The program ID of the server as defined in the .x IDL file.
vers - The program version of the server as defined in the .x IDL file.
rsize - The size of the TCP fragments.
Throws:
RPCError - When the port can not be found in the portmapper (perhaps there is even no portmapper running).
java.io.IOException - When the socket could not be opened.
Method Detail

Call

public void Call(int prog,
                 int vers,
                 int proc,
                 XDRType in,
                 XDRType out)
          throws RPCError,
                 java.io.IOException
Calls the server.
Overrides:
Call in class ClientTCP
Parameters:
prog - The program ID of the server as defined in the .x IDL file.
vers - The program version of the server as defined in the .x IDL file.
proc - The ID of the request function as defined in the .x IDL file.
in - The input parameter (as it has to be marshalled it must be derived from XDRType).
out - The output parameter (as it has to be marshalled it must be derived from XDRType).
Throws:
java.io.IOException - When the call fails because the socket connetion fails.
RPCError - When the calls fails for any other reason.