org.globus.cog.karajan.workflow.service
Class RequestReply

java.lang.Object
  extended by org.globus.cog.karajan.workflow.service.RequestReply
Direct Known Subclasses:
Command, RequestHandler

public abstract class RequestReply
extends Object


Field Summary
static int NOID
           
 
Constructor Summary
RequestReply()
           
 
Method Summary
protected  void addInData(byte[] data)
           
protected  void addOutData(byte[] data)
           
protected  void addOutData(String str)
           
protected  void addOutObject(Object obj)
           
 void channelClosed()
           
protected abstract  void dataReceived(byte[] data)
           
static Object deserialize(byte[] data)
           
 void errorReceived()
           
abstract  void errorReceived(String msg, Exception t)
           
 KarajanChannel getChannel()
           
protected  boolean getErrorFlag()
           
 int getId()
           
protected  String getInCmd()
           
 byte[] getInData()
           
 byte[] getInData(int index)
           
 List getInDataChuncks()
           
protected  Object getInObject(int index)
           
protected  String getOutCmd()
           
 List getOutData()
           
 boolean isInDataReceived()
           
protected  String ppData(String prefix, String cmd, Collection data)
           
 void raiseErrorFlag()
           
 void receiveCompleted()
           
 void register(KarajanChannel channel)
           
abstract  void send()
           
protected  void sendError(String error)
           
 void sendError(String error, Throwable e)
           
static byte[] serialize(Object obj)
           
 void setId(int id)
           
protected  void setInCmd(String inCmd)
           
 void setInData(int index, byte[] data)
           
protected  void setOutCmd(String outCmd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOID

public static final int NOID
See Also:
Constant Field Values
Constructor Detail

RequestReply

public RequestReply()
Method Detail

getInCmd

protected String getInCmd()

setInCmd

protected void setInCmd(String inCmd)

getOutCmd

protected String getOutCmd()

setOutCmd

protected void setOutCmd(String outCmd)

register

public void register(KarajanChannel channel)

addOutData

protected void addOutData(byte[] data)

addOutData

protected void addOutData(String str)

sendError

protected void sendError(String error)
                  throws ProtocolException
Throws:
ProtocolException

sendError

public void sendError(String error,
                      Throwable e)
               throws ProtocolException
Throws:
ProtocolException

raiseErrorFlag

public void raiseErrorFlag()

getErrorFlag

protected boolean getErrorFlag()

send

public abstract void send()
                   throws ProtocolException
Throws:
ProtocolException

dataReceived

protected abstract void dataReceived(byte[] data)
                              throws ProtocolException
Throws:
ProtocolException

addInData

protected void addInData(byte[] data)

receiveCompleted

public void receiveCompleted()

getInDataChuncks

public List getInDataChuncks()

getInData

public byte[] getInData()

getInData

public byte[] getInData(int index)

setInData

public void setInData(int index,
                      byte[] data)

getId

public int getId()

setId

public void setId(int id)

isInDataReceived

public boolean isInDataReceived()

getChannel

public KarajanChannel getChannel()

getOutData

public List getOutData()

errorReceived

public abstract void errorReceived(String msg,
                                   Exception t)

errorReceived

public void errorReceived()

ppData

protected String ppData(String prefix,
                        String cmd,
                        Collection data)

channelClosed

public void channelClosed()

serialize

public static byte[] serialize(Object obj)
                        throws ProtocolException
Throws:
ProtocolException

deserialize

public static Object deserialize(byte[] data)

addOutObject

protected void addOutObject(Object obj)
                     throws ProtocolException
Throws:
ProtocolException

getInObject

protected Object getInObject(int index)