net.fenyo.gnetwatch
Class IPQuerier

java.lang.Object
  extended by net.fenyo.gnetwatch.IPQuerier

public class IPQuerier
extends java.lang.Object

Instances of this class maintain IP options associated to IP targets.

Version:
$Id: IPQuerier.java,v 1.15 2008/04/23 00:46:42 fenyo Exp $
Author:
Alexandre Fenyo

Field Summary
private  java.net.InetAddress address
           
private  java.lang.Long id
           
private static Log log
           
private  int nparallel
           
private  int pdu_max_size
           
private  int port_dst
           
private  int port_src
           
private  java.lang.String proxy_host
           
private  int proxy_port
           
private  boolean reconnect
           
private  int tos
           
private  java.lang.String URL
           
private  boolean use_proxy
           
 
Constructor Summary
IPQuerier()
          Default constructor.
IPQuerier(java.net.InetAddress address)
          Constructor.
 
Method Summary
 java.lang.Object clone()
           
 java.net.InetAddress getAddress()
          Returns the address attribute.
 java.lang.Long getId()
           
 int getNParallel()
          Returns the number of simultaneous sessions.
 int getPDUMaxSize()
          Returns the PDU maximum size attribute.
 int getPortDst()
          Returns the destination port attribute.
 int getPortSrc()
          Returns the source port attribute.
 java.lang.String getProxyHost()
          Returns the proxy host name.
 int getProxyPort()
          Returns the TCP proxy port.
 boolean getReconnect()
          Checks that we must make one connection per GET.
 int getTos()
          Returns the TOS attribute.
 java.lang.String getURL()
          Returns the URL to connect to.
 boolean getUseProxy()
          Checks that we must use the proxy.
private  void parametersHaveChanged()
          Must be called after some setters have been called.
 void setAddress(java.net.InetAddress address)
           
protected  void setId(java.lang.Long id)
           
 void setNParallel(int nparallel)
          Sets the number of simultaneous sessions.
 void setPDUMaxSize(int pdu_max_size)
          Set the PDU maximum size attribute.
 void setPortDst(int port_dst)
          Set the destination port attribute.
 void setPortSrc(int port_src)
          Set the source port attribute.
 void setProxyHost(java.lang.String proxy_host)
          Sets the proxy host name.
 void setProxyPort(int proxy_port)
          Sets the TCP proxy port.
 void setReconnect(boolean reconnect)
          Sets it to true if we must make a new connection for each GET.
 void setTos(int tos)
          Set the TOS attribute.
 void setURL(java.lang.String URL)
          Sets the URL to connect to.
 void setUseProxy(boolean use_proxy)
          Sets it to true if we must use the proxy.
 void update()
          Must be called after some setters have been called.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static Log log

id

private java.lang.Long id

address

private java.net.InetAddress address

tos

private int tos

port_src

private int port_src

port_dst

private int port_dst

pdu_max_size

private int pdu_max_size

use_proxy

private boolean use_proxy

reconnect

private boolean reconnect

proxy_host

private java.lang.String proxy_host

proxy_port

private int proxy_port

URL

private java.lang.String URL

nparallel

private int nparallel
Constructor Detail

IPQuerier

public IPQuerier(java.net.InetAddress address)
Constructor.

Parameters:
address - target address.

IPQuerier

public IPQuerier()
Default constructor.

Parameters:
none. -
Method Detail

getId

public java.lang.Long getId()

setId

protected void setId(java.lang.Long id)

update

public void update()
Must be called after some setters have been called.

Parameters:
none. -

parametersHaveChanged

private final void parametersHaveChanged()
Must be called after some setters have been called.

Parameters:
none. -

getTos

public int getTos()
Returns the TOS attribute.

Parameters:
none. -
Returns:
int TOS attribute.

getAddress

public java.net.InetAddress getAddress()
Returns the address attribute.

Parameters:
none. -
Returns:
InetAddress address attribute.

setAddress

public void setAddress(java.net.InetAddress address)

getPortSrc

public int getPortSrc()
Returns the source port attribute.

Parameters:
none. -
Returns:
int source port attribute.

getPortDst

public int getPortDst()
Returns the destination port attribute.

Parameters:
none. -
Returns:
int destination port attribute.

getPDUMaxSize

public int getPDUMaxSize()
Returns the PDU maximum size attribute.

Parameters:
none. -
Returns:
int PDU maximum size attribute.

getUseProxy

public boolean getUseProxy()
Checks that we must use the proxy.

Parameters:
none. -
Returns:
boolean true if we must use the proxy.

getReconnect

public boolean getReconnect()
Checks that we must make one connection per GET.

Parameters:
none. -
Returns:
boolean true if we must make one connection per GET.

getProxyHost

public java.lang.String getProxyHost()
Returns the proxy host name.

Parameters:
none. -
Returns:
String proxy host name.

getProxyPort

public int getProxyPort()
Returns the TCP proxy port.

Parameters:
none. -
Returns:
String TCP proxy port.

getURL

public java.lang.String getURL()
Returns the URL to connect to.

Parameters:
none. -
Returns:
String URL to connect to.

getNParallel

public int getNParallel()
Returns the number of simultaneous sessions.

Parameters:
none. -
Returns:
int number of simultaneous sessions..

setTos

public void setTos(int tos)
Set the TOS attribute.

Parameters:
tos - TOS attribute.

setPortSrc

public void setPortSrc(int port_src)
Set the source port attribute.

Parameters:
port_src - source_port attribute.

setPortDst

public void setPortDst(int port_dst)
Set the destination port attribute.

Parameters:
port_dst - destination_port attribute.

setPDUMaxSize

public void setPDUMaxSize(int pdu_max_size)
Set the PDU maximum size attribute.

Parameters:
pdu_max_size - PDU maximum size attribute.

setUseProxy

public void setUseProxy(boolean use_proxy)
Sets it to true if we must use the proxy.

Parameters:
use_proxy - true if we must use the proxy.

setReconnect

public void setReconnect(boolean reconnect)
Sets it to true if we must make a new connection for each GET.

Parameters:
reconnect - true if we must make a new connection for each GET.

setProxyHost

public void setProxyHost(java.lang.String proxy_host)
Sets the proxy host name.

Parameters:
proxy_host - proxy host name.

setProxyPort

public void setProxyPort(int proxy_port)
Sets the TCP proxy port.

Parameters:
proxy_port - TCP proxy port.

setURL

public void setURL(java.lang.String URL)
Sets the URL to connect to.

Parameters:
URL - URL to connect to.

setNParallel

public void setNParallel(int nparallel)
Sets the number of simultaneous sessions.

Parameters:
nparallel - number of simultaneous sessions.

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object