com.ezic.net
Class NetworkClient

java.lang.Object
  extended by com.ezic.net.NetworkClient
Direct Known Subclasses:
IdGenerator, V3BatchClient, V3Client

public abstract class NetworkClient
extends java.lang.Object

This is an abstract base-class for www protocol based clients


Field Summary
static java.lang.String PROTOCOL_HTTP
          Plaintext HTTP protocol.
static java.lang.String PROTOCOL_HTTPS
          SSL encrypted HTTPS protocol.
 
Constructor Summary
protected NetworkClient(java.lang.String protocol, java.lang.String server, int port, java.lang.String path)
           
 
Method Summary
 int getPort()
           
 java.lang.String getProtocol()
           
 java.lang.String getServer()
           
 java.net.URL getURL()
           
protected  void setPath(java.lang.String path)
          This function changes the path part of the url
 void setPort(int port)
          This function allows you to change the TCP port used to submit your request to the server.
 void setProtocol(java.lang.String protocol)
          This function allows you to change the protocol used to submit your request to the server.
 void setServer(java.lang.String server)
          This function allows you to change the server your request is submitted to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_HTTP

public static final java.lang.String PROTOCOL_HTTP
Plaintext HTTP protocol. DO NOT USE FOR LIVE TRANSACTIONS.

See Also:
setProtocol(java.lang.String), Constant Field Values

PROTOCOL_HTTPS

public static final java.lang.String PROTOCOL_HTTPS
SSL encrypted HTTPS protocol.

See Also:
setProtocol(java.lang.String), Constant Field Values
Constructor Detail

NetworkClient

protected NetworkClient(java.lang.String protocol,
                        java.lang.String server,
                        int port,
                        java.lang.String path)
Method Detail

setServer

public void setServer(java.lang.String server)
               throws java.net.MalformedURLException
This function allows you to change the server your request is submitted to.

Throws:
java.net.MalformedURLException

setProtocol

public void setProtocol(java.lang.String protocol)
                 throws java.net.MalformedURLException
This function allows you to change the protocol used to submit your request to the server. it should be one of PROTOCOL_HTTP and PROTOCOL_HTTPS. Default is PROTOCOL_HTTP. If you select PROTOCOL_HTTPS (SSL encryption) you will need to use Java 1.4 or newer, or install the java SSL package available from http://java.sun.com/products/jsse/,

Throws:
java.net.MalformedURLException
See Also:
PROTOCOL_HTTP, PROTOCOL_HTTPS

setPort

public void setPort(int port)
             throws java.net.MalformedURLException
This function allows you to change the TCP port used to submit your request to the server. it should be 1401 for HTTP and 1402 for HTTPS.

Throws:
java.net.MalformedURLException

setPath

protected void setPath(java.lang.String path)
                throws java.net.MalformedURLException
This function changes the path part of the url

Throws:
java.net.MalformedURLException

getURL

public java.net.URL getURL()

getProtocol

public java.lang.String getProtocol()

getServer

public java.lang.String getServer()

getPort

public int getPort()

Version 3.1.1

This is propriatary and confidential unpublished information. Copyright(c) 1999-2014, All rights reserved.