net.sf.j3d.trash
Class NetworkClient

java.lang.Object
  extended by net.sf.j3d.trash.NetworkClient

public class NetworkClient
extends Object

A NetworkClient instance can be used to send jobs/messages to a server.

Author:
Mike Murray

Constructor Summary
NetworkClient(String host, int port)
          Constructs a new NetworkClient object using the specified host information to connect to a server.
 
Method Summary
static void main(String[] args)
           
 void sendJob(Job j)
          Sends the specified Job object to the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkClient

public NetworkClient(String host,
                     int port)
              throws IOException,
                     InvalidKeyException,
                     NoSuchAlgorithmException,
                     InvalidKeySpecException,
                     NoSuchPaddingException,
                     InvalidAlgorithmParameterException,
                     GSSException
Constructs a new NetworkClient object using the specified host information to connect to a server.

Parameters:
host - Hostname of server.
port - Remote port.
Throws:
IOException - If a connection cannot be established.
GSSException
InvalidAlgorithmParameterException
NoSuchPaddingException
InvalidKeySpecException
NoSuchAlgorithmException
InvalidKeyException
Method Detail

main

public static void main(String[] args)
                 throws IOException,
                        InterruptedException,
                        InvalidKeyException,
                        NumberFormatException,
                        NoSuchAlgorithmException,
                        InvalidKeySpecException,
                        NoSuchPaddingException,
                        InvalidAlgorithmParameterException,
                        GSSException
Throws:
IOException
InterruptedException
InvalidKeyException
NumberFormatException
NoSuchAlgorithmException
InvalidKeySpecException
NoSuchPaddingException
InvalidAlgorithmParameterException
GSSException

sendJob

public void sendJob(Job j)
             throws IOException
Sends the specified Job object to the server.

Parameters:
j - Job to encode and send.
Throws:
IOException - If an IO error occurs while sending.