net.agmodel.metBean
Class StationRequestBean

java.lang.Object
  |
  +--net.agmodel.utilBean.RequestBean
        |
        +--net.agmodel.metBean.MetRequestBean
              |
              +--net.agmodel.metBean.StationRequestBean
All Implemented Interfaces:
AllowSummarizingListener, ElementsListener, EventListener, IntervalListener, ResolutionListener, Runnable, StationListener

public class StationRequestBean
extends MetRequestBean
implements StationListener


Field Summary
protected  MetSourceDetail metSource
           
protected  WeatherStation station
           
 
Fields inherited from class net.agmodel.metBean.MetRequestBean
allowSummarizing, elements, interval, resolution
 
Fields inherited from class net.agmodel.utilBean.RequestBean
brokerHTTP, brokerRMI, dataListeners, indeterminateListeners, loginDialog, parent, rb, retrieveDataThread, sessionID, ub
 
Constructor Summary
StationRequestBean(Frame parent)
           
 
Method Summary
protected  void fireSpecificEvent(RequestBeanListener listener, ServerResult result)
           
protected  ServerResult getData(ServerRequest request)
          Implemented by descendant requestBeans to call the broker to get the data.
protected  ServerRequest makeRequest()
          Implemented by descendant requestBeans to create an appropriate request object for this kind of broker.
 void newWeatherStation(StationEvent evt)
           
protected  boolean readyToRequest()
           
protected  void setUpBean()
           
protected  boolean suitableLogin(ServerRequest request)
          Implemented by descendant requestBeans to select which login mechanism to use.
 
Methods inherited from class net.agmodel.metBean.MetRequestBean
newAllowSummarizing, newElements, newInterval, newResolution
 
Methods inherited from class net.agmodel.utilBean.RequestBean
addDataListener, addIndeterminateListener, alreadyLoggedIn, clearListeners, fireDataArrivedEvent, fireDataRequestedEvent, fireIndeterminateEvent, listSourceDetails, login, login, loginToDataSource, removeDataListener, removeIndeterminateListener, run, runRetrieveThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metSource

protected transient MetSourceDetail metSource

station

protected transient WeatherStation station
Constructor Detail

StationRequestBean

public StationRequestBean(Frame parent)
Method Detail

setUpBean

protected void setUpBean()
Overrides:
setUpBean in class MetRequestBean

newWeatherStation

public void newWeatherStation(StationEvent evt)
Specified by:
newWeatherStation in interface StationListener

readyToRequest

protected boolean readyToRequest()
Overrides:
readyToRequest in class MetRequestBean

makeRequest

protected ServerRequest makeRequest()
Description copied from class: RequestBean
Implemented by descendant requestBeans to create an appropriate request object for this kind of broker.

Specified by:
makeRequest in class RequestBean
Returns:
a request to be sent to the broker.

suitableLogin

protected boolean suitableLogin(ServerRequest request)
                         throws RemoteException,
                                GeneralException
Description copied from class: RequestBean
Implemented by descendant requestBeans to select which login mechanism to use.
Should either called login(GeographicalArea) or login(String), depending on whether spatial request bean or data source request bean

Specified by:
suitableLogin in class RequestBean
Returns:
true if at least one database is accessible after the logging in process.
RemoteException
GeneralException

fireSpecificEvent

protected void fireSpecificEvent(RequestBeanListener listener,
                                 ServerResult result)
Specified by:
fireSpecificEvent in class RequestBean

getData

protected ServerResult getData(ServerRequest request)
                        throws RemoteException,
                               GeneralException
Description copied from class: RequestBean
Implemented by descendant requestBeans to call the broker to get the data.
These beans can use brokerRMI if the connection is RMI, or brokerHTTP if the connection is via HTTP.

Specified by:
getData in class RequestBean
Returns:
a request to be sent to the broker.
RemoteException
GeneralException