org.mbari.siam.operations.portal
Class Portal

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.mbari.siam.operations.portal.Portal
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, PortalInterface

public class Portal
extends java.rmi.server.UnicastRemoteObject
implements PortalInterface

Portal is the "gateway" between clients on the local network, and a remote node server located on the far side of a low-bandwidth/intermittent connection.

When a communications link to the node is available, the Portal attempts to retrieve data from the node's sensors. The retrieved packets are then distributed to shore clients, as well as saved in a file buffer. The Portal keeps track of which packets it has retrieved from each sensor; on subsequent retrievals it requests the "latest" data from the sensor.

Author:
Tom O'Reilly
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
Portal(java.lang.String[] primaryNodeNames, long startRetrieveTime, boolean publishPackets, java.lang.String logDirectory, boolean doProfile, boolean doWDT, java.util.Vector preferredNodes, boolean resumeStreams)
          Construct Portal for specified node.
 
Method Summary
protected  void getProperties()
          Look for System property "leaseTime", "readTimeout", "downloadInterval", and "systemCommand"
static void main(java.lang.String[] args)
           
 void nodeLinkNotify(java.net.InetAddress remoteAddr, boolean connected)
          Notify PortalConnections that network link has come up/down
 boolean primaryLinkConnected(java.net.InetAddress address)
          Return true if portal has network connection to specified primary node.
 void run()
          Wait for and accept new client connection; add new client to list of clients.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Portal

public Portal(java.lang.String[] primaryNodeNames,
              long startRetrieveTime,
              boolean publishPackets,
              java.lang.String logDirectory,
              boolean doProfile,
              boolean doWDT,
              java.util.Vector preferredNodes,
              boolean resumeStreams)
       throws java.rmi.RemoteException,
              java.net.UnknownHostException,
              java.io.IOException,
              java.lang.Exception
Construct Portal for specified node.

Throws:
java.rmi.RemoteException
java.net.UnknownHostException
java.io.IOException
java.lang.Exception
Method Detail

run

public void run()
Wait for and accept new client connection; add new client to list of clients.


getProperties

protected void getProperties()
Look for System property "leaseTime", "readTimeout", "downloadInterval", and "systemCommand"


nodeLinkNotify

public void nodeLinkNotify(java.net.InetAddress remoteAddr,
                           boolean connected)
Notify PortalConnections that network link has come up/down

Specified by:
nodeLinkNotify in interface PortalInterface

primaryLinkConnected

public boolean primaryLinkConnected(java.net.InetAddress address)
                             throws java.rmi.RemoteException,
                                    java.lang.Exception
Return true if portal has network connection to specified primary node.

Specified by:
primaryLinkConnected in interface PortalInterface
Throws:
java.rmi.RemoteException
java.lang.Exception

main

public static void main(java.lang.String[] args)


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.