com.jagacy
Class AbstractConduit

java.lang.Object
  extended bycom.jagacy.AbstractConduit

public abstract class AbstractConduit
extends java.lang.Object

TODO Description of class

Author:
Robert M. Preston

Field Summary
protected  int myHeight
           
protected  java.io.InputStream myInput
           
protected  Logger myLogger
           
protected  java.lang.Object myMutex
           
protected  java.io.OutputStream myOutput
           
protected  JagacyProperties myProperties
           
protected  java.lang.String myTerminal
           
protected  int myWidth
           
 
Constructor Summary
protected AbstractConduit()
           
 
Method Summary
protected  void abort()
           
 void close()
           
protected abstract  int[] createReceiveState()
           
 int getHeight()
           
protected abstract  int[] getHeights()
           
protected abstract  java.lang.String[] getTerminals()
           
 int getWidth()
           
protected abstract  int[] getWidths()
           
protected  void init()
           
abstract  boolean isExtended()
           
protected abstract  boolean isInitialReceiveState(int[] state)
           
protected abstract  boolean isReceiveDone(int[] state, byte b)
           
protected abstract  boolean isValidReceivedData(int[] state, byte b)
           
abstract  void open()
           
protected  com.jagacy.util.ByteBuffer receive(com.jagacy.util.ByteBuffer readBuffer)
           
abstract  com.jagacy.util.ByteBuffer receive(int timeout)
           
protected abstract  void resetTimeout()
           
protected  void send(byte[] data)
           
abstract  void send(com.jagacy.util.ByteBuffer data)
           
 void setLogger(Logger logger)
           
 void setProperties(JagacyProperties properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myWidth

protected int myWidth

myHeight

protected int myHeight

myProperties

protected JagacyProperties myProperties

myLogger

protected Logger myLogger

myInput

protected java.io.InputStream myInput

myOutput

protected java.io.OutputStream myOutput

myMutex

protected java.lang.Object myMutex

myTerminal

protected java.lang.String myTerminal
Constructor Detail

AbstractConduit

protected AbstractConduit()
Method Detail

open

public abstract void open()
                   throws JagacyException
Throws:
JagacyException

send

public abstract void send(com.jagacy.util.ByteBuffer data)
                   throws JagacyException
Throws:
JagacyException

receive

public abstract com.jagacy.util.ByteBuffer receive(int timeout)
                                            throws JagacyException
Throws:
JagacyException

isExtended

public abstract boolean isExtended()

getTerminals

protected abstract java.lang.String[] getTerminals()

getWidths

protected abstract int[] getWidths()

getHeights

protected abstract int[] getHeights()

createReceiveState

protected abstract int[] createReceiveState()

resetTimeout

protected abstract void resetTimeout()
                              throws JagacyException
Throws:
JagacyException

isInitialReceiveState

protected abstract boolean isInitialReceiveState(int[] state)

isValidReceivedData

protected abstract boolean isValidReceivedData(int[] state,
                                               byte b)

isReceiveDone

protected abstract boolean isReceiveDone(int[] state,
                                         byte b)

setLogger

public void setLogger(Logger logger)

setProperties

public void setProperties(JagacyProperties properties)

getWidth

public int getWidth()

getHeight

public int getHeight()

init

protected void init()
             throws JagacyException
Throws:
JagacyException

send

protected void send(byte[] data)
             throws JagacyException
Throws:
JagacyException

receive

protected com.jagacy.util.ByteBuffer receive(com.jagacy.util.ByteBuffer readBuffer)
                                      throws JagacyException
Throws:
JagacyException

abort

protected void abort()
              throws JagacyException
Throws:
JagacyException

close

public void close()
           throws JagacyException
Throws:
JagacyException