org.mbari.siam.foce.deployed
Class RemoteIOMapper

java.lang.Object
  extended by org.mbari.siam.foce.deployed.RemoteIOMapper
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FOCERemoteRelay

public class RemoteIOMapper
extends java.lang.Object
implements java.io.Serializable

RemoteIOMapper opens a socket to a native daemon, written in 'C', that does port-level I/O on behalf of the Java applications. The 'Remote' version can talk to a remote host, but cannot try to exec the foceio daemon as the local version can.

Author:
Bob Herlien
See Also:
Serialized Form

Field Summary
protected  java.io.OutputStream _out
           
protected static int IOPORT_PORT
           
 
Constructor Summary
RemoteIOMapper(java.lang.String hostName)
           
 
Method Summary
 void close()
           
 java.lang.String transact(java.lang.String cmd)
          Perform one I/O transaction with the I/O server, return String result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IOPORT_PORT

protected static final int IOPORT_PORT
See Also:
Constant Field Values

_out

protected java.io.OutputStream _out
Constructor Detail

RemoteIOMapper

public RemoteIOMapper(java.lang.String hostName)
               throws java.io.IOException,
                      java.net.UnknownHostException
Throws:
java.io.IOException
java.net.UnknownHostException
Method Detail

transact

public java.lang.String transact(java.lang.String cmd)
                          throws java.io.IOException
Perform one I/O transaction with the I/O server, return String result. Check to make sure return string starts with "OK". If so, return remainder of string. Else, throw IOException with return string as message.

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException


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.