org.globus.cog.karajan.workflow.service.channels
Class AbstractKarajanChannel
java.lang.Object
org.globus.cog.karajan.workflow.service.channels.AbstractKarajanChannel
- All Implemented Interfaces:
- KarajanChannel
- Direct Known Subclasses:
- AbstractStreamKarajanChannel, BufferingChannel, MetaChannel, NullChannel
public abstract class AbstractKarajanChannel
- extends Object
- implements KarajanChannel
Method Summary |
void |
close()
|
int |
decLongTermUsageCount()
|
int |
decUsageCount()
|
ChannelContext |
getChannelContext()
|
protected int |
getLongTermUsageCount()
|
RequestManager |
getRequestManager()
|
int |
incLongTermUsageCount()
|
int |
incUsageCount()
|
boolean |
isClient()
|
boolean |
isClosed()
|
boolean |
isLocalShutdown()
|
static String |
ppByteBuf(byte[] data)
|
protected int |
readFromStream(InputStream stream,
byte[] buf,
int crt)
|
protected void |
readFromStream(InputStream stream,
ByteBuffer buf)
|
void |
registerCommand(Command cmd)
|
void |
registerHandler(RequestHandler handler,
int tag)
|
void |
sendTaggedData(int tag,
boolean fin,
byte[] data)
|
void |
sendTaggedReply(int tag,
byte[] data,
boolean fin)
|
void |
sendTaggedReply(int tag,
byte[] data,
boolean fin,
boolean err)
|
void |
setChannelContext(ChannelContext context)
|
void |
setLocalShutdown()
|
void |
shutdown()
|
void |
unregisterCommand(Command cmd)
|
void |
unregisterHandler(int tag)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractKarajanChannel
protected AbstractKarajanChannel(RequestManager requestManager,
ChannelContext channelContext)
registerCommand
public void registerCommand(Command cmd)
throws ProtocolException
- Specified by:
registerCommand
in interface KarajanChannel
- Throws:
ProtocolException
unregisterCommand
public void unregisterCommand(Command cmd)
- Specified by:
unregisterCommand
in interface KarajanChannel
registerHandler
public void registerHandler(RequestHandler handler,
int tag)
- Specified by:
registerHandler
in interface KarajanChannel
unregisterHandler
public void unregisterHandler(int tag)
- Specified by:
unregisterHandler
in interface KarajanChannel
sendTaggedReply
public void sendTaggedReply(int tag,
byte[] data,
boolean fin)
sendTaggedData
public void sendTaggedData(int tag,
boolean fin,
byte[] data)
- Specified by:
sendTaggedData
in interface KarajanChannel
sendTaggedReply
public void sendTaggedReply(int tag,
byte[] data,
boolean fin,
boolean err)
- Specified by:
sendTaggedReply
in interface KarajanChannel
getChannelContext
public ChannelContext getChannelContext()
- Specified by:
getChannelContext
in interface KarajanChannel
setChannelContext
public void setChannelContext(ChannelContext context)
- Specified by:
setChannelContext
in interface KarajanChannel
readFromStream
protected void readFromStream(InputStream stream,
ByteBuffer buf)
throws IOException
- Throws:
IOException
readFromStream
protected int readFromStream(InputStream stream,
byte[] buf,
int crt)
throws IOException
- Throws:
IOException
ppByteBuf
public static String ppByteBuf(byte[] data)
getRequestManager
public RequestManager getRequestManager()
- Specified by:
getRequestManager
in interface KarajanChannel
decUsageCount
public int decUsageCount()
- Specified by:
decUsageCount
in interface KarajanChannel
incUsageCount
public int incUsageCount()
- Specified by:
incUsageCount
in interface KarajanChannel
decLongTermUsageCount
public int decLongTermUsageCount()
- Specified by:
decLongTermUsageCount
in interface KarajanChannel
incLongTermUsageCount
public int incLongTermUsageCount()
- Specified by:
incLongTermUsageCount
in interface KarajanChannel
getLongTermUsageCount
protected int getLongTermUsageCount()
shutdown
public void shutdown()
- Specified by:
shutdown
in interface KarajanChannel
close
public void close()
- Specified by:
close
in interface KarajanChannel
isClosed
public boolean isClosed()
setLocalShutdown
public void setLocalShutdown()
- Specified by:
setLocalShutdown
in interface KarajanChannel
isLocalShutdown
public boolean isLocalShutdown()
isClient
public boolean isClient()
- Specified by:
isClient
in interface KarajanChannel