Class cern.lhcias.csgui.Drivers.HTTPDriver

java.lang.Object
   |
   +----cern.lhcias.csgui.Drivers.HTTPDriver

public class HTTPDriver
extends Object
implements Runnable, DataServer


This class is an implementation of DataServer using the http protocol. The URL used to fetch the data is passed to the driver with the method setReadHost.
Ex : setReadHost(« http://www.mydomain.ch :8000/ cgi-bin/getTagsValue»)
The method setWriteHost must be called if data have to be sent back across the network. It is not needed to call setReadPort and setWritePort, the port number being passed in the Host String.
To start a pooling mechanism, one has to set the pooling interval and then call the method enable().
There is one parameter which may bet set with setParameter. It is a TagNamesInURL which is a boolean.
Ex : setParameter(« TagNamesInURL », « true »)
If this parameter is set to true, then the names of the requested tags will be appended to the URL in the following way :
Ex : http://www.mydomain.ch :8000/ cgi-bin/getTagsValue ?tags=tag1,tag2

See Also:
DataServer

Constructor Index

 o HTTPDriver()
 

Method Index

 o addAlarmListener(AlarmListener)
 
 o closeConnection()
 
 o disable()
 
 o doYouImplement(String)
 
 o enable()
 
 o getDriverProtocol()
 
 o getMask()
 
 o getParameter(String)
 
 o getPassword()
 
 o getPoolingInterval()
 
 o getPossibleProtocols()
 
 o getProcessName()
 
 o getReadHost()
 
 o getReadPort()
 
 o getTagsSubscription()
 
 o getType()
 
 o getUser()
 
 o getWriteHost()
 
 o getWritePort()
 
 o isActive()
 
 o read(String)
 
 o read(Vector)
 
 o removeAlarmListener(AlarmListener)
 
 o run()
 
 o setConfig(String)
Config is in the following format ProcessName;Protocol;Type;ReadHost;ReadPort;WriteHost;WritePort; PoolFrequency;subscriptionMode[;param1=val1[;...]]
 o setMask(boolean)
 
 o setParameter(String, String)
 
 o setPassword(String)
 
 o setPoolingInterval(long)
 
 o setProcessName(String)
 
 o setReadHost(String)
 
 o setReadPort(int)
 
 o setTagArrays(TagArrays)
 
 o setTagsSubscription(boolean)
 
 o setType(String)
 
 o setUser(String)
 
 o setWriteHost(String)
 
 o setWritePort(int)
 
 o toString()
The returned string is in the following format ProcessName;Protocol;Type;ReadHost;ReadPort;WriteHost;WritePort; PoolFrequency;subscriptionMode[;param1=val1[;...]]
 o write(String, String)
 

Constructors

 o HTTPDriver

 public HTTPDriver()

Methods

 o addAlarmListener

 public void addAlarmListener(AlarmListener listener)

 o removeAlarmListener

 public void removeAlarmListener(AlarmListener listener)

 o setReadHost

 public void setReadHost(String get_URL_string)

 o getReadHost

 public String getReadHost()

 o setReadPort

 public void setReadPort(int com_port)

 o getReadPort

 public int getReadPort()

 o setWriteHost

 public void setWriteHost(String write_URL_string)

 o getWriteHost

 public String getWriteHost()

 o setWritePort

 public void setWritePort(int com_port)

 o getWritePort

 public int getWritePort()

 o closeConnection

 public void closeConnection()

 o setTagArrays

 public void setTagArrays(TagArrays tc)

 o setPoolingInterval

 public void setPoolingInterval(long pooling_interval)

 o getPoolingInterval

 public long getPoolingInterval()

 o setParameter

 public void setParameter(String parameter,
                          String value)

 o getParameter

 public String getParameter(String parameter)

 o setType

 public void setType(String Type)

 o getType

 public String getType()

 o setMask

 public void setMask(boolean Mask)

 o getMask

 public boolean getMask()

 o setUser

 public void setUser(String user)

 o setPassword

 public void setPassword(String password)

 o getUser

 public String getUser()

 o getPassword

 public String getPassword()

 o setTagsSubscription

 public void setTagsSubscription(boolean subMode)

 o getTagsSubscription

 public boolean getTagsSubscription()

 o setProcessName

 public void setProcessName(String processname)

 o getProcessName

 public String getProcessName()

 o doYouImplement

 public boolean doYouImplement(String type)

 o getPossibleProtocols

 public Vector getPossibleProtocols()

 o getDriverProtocol

 public String getDriverProtocol()

 o setConfig

 public void setConfig(String config)
Config is in the following format ProcessName;Protocol;Type;ReadHost;ReadPort;WriteHost;WritePort; PoolFrequency;subscriptionMode[;param1=val1[;...]]

 o toString

 public String toString()
The returned string is in the following format ProcessName;Protocol;Type;ReadHost;ReadPort;WriteHost;WritePort; PoolFrequency;subscriptionMode[;param1=val1[;...]]
Overrides:
toString in class Object

 o isActive

 public boolean isActive()

 o disable

 public void disable()

 o enable

 public void enable()

 o run

 public void run()

 o write

 public void write(String name,
                   String stringValue)

 o read

 public String read(String name)

 o read

 public boolean read(Vector names)