FileDocCategorySizeDatePackage
Person_Stub.javaAPI DocExample1305Mon Dec 06 23:35:22 GMT 1999None

Person_Stub

public class Person_Stub extends Object implements Person

Fields Summary
Socket
socket
Constructors Summary
public Person_Stub()

       // Create a network connection to the skeleton. 
       // Replace "myhost" with your own IP Address of your computer.
       socket = new Socket("myhost",9000);
    
Methods Summary
public intgetAge()

       // When this method is invoked, stream the method name to the
       // skeleton.
       ObjectOutputStream outStream = 
           new ObjectOutputStream(socket.getOutputStream());
       outStream.writeObject("age");
       outStream.flush();
       ObjectInputStream inStream = 
           new ObjectInputStream(socket.getInputStream());
       return inStream.readInt();
    
public java.lang.StringgetName()

        // When this method is invoked, stream the method name to the
        // skeleton.
        ObjectOutputStream outStream = 
            new ObjectOutputStream(socket.getOutputStream());
        outStream.writeObject("name");
        outStream.flush();
        ObjectInputStream inStream = 
            new ObjectInputStream(socket.getInputStream());
        return (String)inStream.readObject();