|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.mbari.siam.operations.utils.NodeProxy
public class NodeProxy
Uses Socket I/O instead of RMI to talk to Node. Requires NodeServer on Node side to act as its peer.
| Constructor Summary | |
|---|---|
NodeProxy()
|
|
| Method Summary | |
|---|---|
protected void |
checkReturn(java.lang.Object obj,
java.lang.Class cl)
|
boolean |
connectNode(java.net.InetAddress inAddr)
Connect to the Node Server. |
void |
disconnectNode()
Disconnect from the Node Server |
int |
establishLease(long leaseMillisec)
Request a lease of the Node's comms medium |
protected java.lang.Object |
getAndCheckRemoteObject(java.lang.String cmd,
java.lang.Class cl)
|
DevicePacketSet |
getDevicePackets(long sensorID,
long startTime,
long endTime)
Get DevicePacket objects, from specified sensor, within specified time window. |
long |
getId()
Unique identifier for Node instance |
byte[] |
getName()
Name of Node service class. |
Port[] |
getPorts()
Get array of Node's Port objects. |
protected long |
getRemoteLong(java.lang.String cmd)
Internal function to send string and return Long |
protected java.lang.Object |
getRemoteObject(java.lang.String cmd)
Internal function to send string and return Object |
java.net.InetAddress |
host()
Return InetAddress of device service host. |
boolean |
nodeConnected()
Returns true if portal currently has "live" connection to remote node. |
void |
renewLease(int leaseID,
long leaseMillisec)
Renew a lease with the Node's comms medium |
void |
terminateLease(int leaseID)
Terminate the session with the communications link. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeProxy()
| Method Detail |
|---|
public boolean connectNode(java.net.InetAddress inAddr)
public void disconnectNode()
public boolean nodeConnected()
public java.net.InetAddress host()
throws java.io.IOException
java.io.IOException
protected java.lang.Object getRemoteObject(java.lang.String cmd)
throws java.io.IOException
java.io.IOException
protected void checkReturn(java.lang.Object obj,
java.lang.Class cl)
throws java.rmi.UnexpectedException
java.rmi.UnexpectedException
protected java.lang.Object getAndCheckRemoteObject(java.lang.String cmd,
java.lang.Class cl)
throws java.io.IOException,
java.rmi.UnexpectedException
java.io.IOException
java.rmi.UnexpectedException
protected long getRemoteLong(java.lang.String cmd)
throws java.io.IOException,
java.rmi.UnexpectedException
java.io.IOException
java.rmi.UnexpectedException
public byte[] getName()
throws java.io.IOException,
java.rmi.UnexpectedException
java.io.IOException
java.rmi.UnexpectedException
public long getId()
throws java.io.IOException,
java.rmi.UnexpectedException
java.io.IOException
java.rmi.UnexpectedException
public Port[] getPorts()
throws java.io.IOException,
java.rmi.UnexpectedException
java.io.IOException
java.rmi.UnexpectedException
public DevicePacketSet getDevicePackets(long sensorID,
long startTime,
long endTime)
throws java.io.IOException,
java.rmi.UnexpectedException,
DeviceNotFound,
NoDataException
java.io.IOException
java.rmi.UnexpectedException
DeviceNotFound
NoDataException
public int establishLease(long leaseMillisec)
throws java.io.IOException,
java.rmi.UnexpectedException,
LeaseRefused
leaseMillisec - lease period in milliseconds
java.io.IOException
java.rmi.UnexpectedException
LeaseRefused
public void renewLease(int leaseID,
long leaseMillisec)
throws java.io.IOException,
java.rmi.UnexpectedException,
LeaseRefused
leaseID - lease ID returned by establishLease()leaseMillisec - lease period in milliseconds
java.io.IOException
java.rmi.UnexpectedException
LeaseRefused
public void terminateLease(int leaseID)
throws java.io.IOException,
java.rmi.UnexpectedException
leaseID - lease ID returned by establishLease()
java.io.IOException
java.rmi.UnexpectedException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||