org.mbari.siam.moos.utils.nodeview.monitor
Class NodeProxyImpl

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.moos.utils.nodeview.monitor.NodeProxyImpl
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, NodeProxy

public class NodeProxyImpl
extends java.rmi.server.UnicastRemoteObject
implements NodeProxy

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger _log4j
          log4j logger
protected  ParserFactory _parserFactory
          for now, we use a factory method to retrieve custom made parsers; later, we'll use XML or SSDS interface
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
NodeProxyImpl()
          Default Constructor
 
Method Summary
 void doPortOperation(java.awt.event.ActionEvent e, java.lang.String nodeURL, java.lang.String[] selectedPorts)
          Do a specified operation (event Action command) on a node for a given set of ports
 Device getDevice(Node node, long id)
          Return a device service with the specified id from the specified node
 double getNodeSample(java.lang.String nodeURL, long isiID, java.lang.String dataItem)
          Get and parse a sample from device with isiID on a specified node; Parser is expected to recognize dataItem mnemonic to identify the particular data item to be returned.
 Node getNodeService(java.lang.String nodeURL)
          Return the specified node service
 SensorDataPacket getPacketFromNode(java.lang.String nodeURL, long isiID)
          Request a data packet w/o logging from the specified node
 SensorDataPacket getPacketFromStream(java.lang.String portalURL, long isiID)
          Get a packet from a portal data stream
 DevicePacketStream getPacketStream(java.lang.String portalURL)
          Return a device packet stream from the specified portal
 java.util.Vector getParsedPacket(java.lang.String portalURL, long isiID)
          Get a vector of all data contained in a specified packet from a portal packet stream
 double getPortalSample(java.lang.String portalURL, long isiID, java.lang.String dataItem)
          Get and parse a sample from device with isiID from a portal packet stream; Parser is expected to recognize dataItem mnemonic to identify the particular data item to be returned.
 Port[] getPorts(Node nodeService)
          Return an array of all available ports on the specified node
 Port[] getPorts(java.lang.String nodeURL)
          Return an array of all available ports on the specified node
 java.lang.String[][] getPortStatusStrings(java.lang.String nodeURL)
          Get an array of strings indicating the status of all ports on a given node
 double pickANumber()
          Test code generates a random number
 void setSecurityManager()
          Set security manager is it has not been set
 
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
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j
log4j logger


_parserFactory

protected ParserFactory _parserFactory
for now, we use a factory method to retrieve custom made parsers; later, we'll use XML or SSDS interface

Constructor Detail

NodeProxyImpl

public NodeProxyImpl()
              throws java.rmi.RemoteException
Default Constructor

Throws:
java.rmi.RemoteException
Method Detail

pickANumber

public double pickANumber()
                   throws java.rmi.RemoteException
Test code generates a random number

Specified by:
pickANumber in interface NodeProxy
Throws:
java.rmi.RemoteException

getNodeSample

public double getNodeSample(java.lang.String nodeURL,
                            long isiID,
                            java.lang.String dataItem)
                     throws java.rmi.RemoteException
Get and parse a sample from device with isiID on a specified node; Parser is expected to recognize dataItem mnemonic to identify the particular data item to be returned.

Specified by:
getNodeSample in interface NodeProxy
Throws:
java.rmi.RemoteException

getPortalSample

public double getPortalSample(java.lang.String portalURL,
                              long isiID,
                              java.lang.String dataItem)
                       throws java.rmi.RemoteException
Get and parse a sample from device with isiID from a portal packet stream; Parser is expected to recognize dataItem mnemonic to identify the particular data item to be returned.

Specified by:
getPortalSample in interface NodeProxy
Throws:
java.rmi.RemoteException

getParsedPacket

public java.util.Vector getParsedPacket(java.lang.String portalURL,
                                        long isiID)
                                 throws java.rmi.RemoteException
Get a vector of all data contained in a specified packet from a portal packet stream

Specified by:
getParsedPacket in interface NodeProxy
Throws:
java.rmi.RemoteException

getPacketStream

public DevicePacketStream getPacketStream(java.lang.String portalURL)
Return a device packet stream from the specified portal


getPacketFromStream

public SensorDataPacket getPacketFromStream(java.lang.String portalURL,
                                            long isiID)
Get a packet from a portal data stream


setSecurityManager

public void setSecurityManager()
Set security manager is it has not been set


getNodeService

public Node getNodeService(java.lang.String nodeURL)
Return the specified node service

Specified by:
getNodeService in interface NodeProxy

getDevice

public Device getDevice(Node node,
                        long id)
Return a device service with the specified id from the specified node


getPacketFromNode

public SensorDataPacket getPacketFromNode(java.lang.String nodeURL,
                                          long isiID)
Request a data packet w/o logging from the specified node


getPorts

public Port[] getPorts(java.lang.String nodeURL)
                throws java.rmi.RemoteException
Return an array of all available ports on the specified node

Specified by:
getPorts in interface NodeProxy
Throws:
java.rmi.RemoteException

getPorts

public Port[] getPorts(Node nodeService)
                throws java.rmi.RemoteException
Return an array of all available ports on the specified node

Throws:
java.rmi.RemoteException

getPortStatusStrings

public java.lang.String[][] getPortStatusStrings(java.lang.String nodeURL)
                                          throws java.rmi.RemoteException
Get an array of strings indicating the status of all ports on a given node

Specified by:
getPortStatusStrings in interface NodeProxy
Throws:
java.rmi.RemoteException

doPortOperation

public void doPortOperation(java.awt.event.ActionEvent e,
                            java.lang.String nodeURL,
                            java.lang.String[] selectedPorts)
                     throws java.rmi.RemoteException
Do a specified operation (event Action command) on a node for a given set of ports

Specified by:
doPortOperation in interface NodeProxy
Throws:
java.rmi.RemoteException


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.