com.eyebolt.iplib
Class ReceiveThread

java.lang.Object
  |
  +--com.eyebolt.iplib.ReceiveThread
All Implemented Interfaces:
java.lang.Runnable

public class ReceiveThread
extends java.lang.Object
implements java.lang.Runnable

A thread to receive data on a ipmanager connection

Version:
0.01, 16 Jul 2000
Author:
Jay Roberts & John Gardner

Field Summary
static int DONE
          Description of the Field
private  boolean keepGoing
          flag to stop the thread
private  java.util.Vector keys
          Sockets (IPKeys) to receive on
static int RUNNING
          Description of the Field
static int STARTED
          Value returned when an operation runs successfully
private  int status
          status of thread
private  java.util.Vector streams
          Input stream for each socket
private  java.lang.Thread thread
          actual thread running
 
Constructor Summary
ReceiveThread()
          Constructor for the ReceiveThread object
 
Method Summary
(package private)  void assign(IPKey key)
          Assign this thread to receive on a particular key.
(package private)  void endThread()
          stop recv
 void run()
          Main processing method for the ReceiveThread object
 void setStatus(int newstat)
          Sets the Status attribute of the ReceiveThread object
(package private)  void unassign(IPKey key)
          Remove responsibility for a key from this thread.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

STARTED

public static final int STARTED
Value returned when an operation runs successfully

RUNNING

public static final int RUNNING
Description of the Field

DONE

public static final int DONE
Description of the Field

thread

private java.lang.Thread thread
actual thread running

keepGoing

private boolean keepGoing
flag to stop the thread

status

private int status
status of thread

keys

private java.util.Vector keys
Sockets (IPKeys) to receive on

streams

private java.util.Vector streams
Input stream for each socket
Constructor Detail

ReceiveThread

public ReceiveThread()
Constructor for the ReceiveThread object
Method Detail

setStatus

public void setStatus(int newstat)
Sets the Status attribute of the ReceiveThread object
Parameters:
newstat - The new Status value

assign

void assign(IPKey key)
      throws java.io.IOException
Assign this thread to receive on a particular key.
Parameters:
key - key on which to receive
Throws:
java.io.IOException - on error

unassign

void unassign(IPKey key)
Remove responsibility for a key from this thread.
Parameters:
key - key to remove

endThread

void endThread()
stop recv

run

public void run()
Main processing method for the ReceiveThread object
Specified by:
run in interface java.lang.Runnable


Copyright © 2001 Eyebolt, Inc.