org.globus.cog.karajan.workflow.service
Class RequestReply
java.lang.Object
org.globus.cog.karajan.workflow.service.RequestReply
- Direct Known Subclasses:
- Command, RequestHandler
public abstract class RequestReply
- extends Object
Field Summary |
static int |
NOID
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOID
public static final int NOID
- See Also:
- Constant Field Values
RequestReply
public RequestReply()
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)