|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.catalina.connector.warp.WarpHandler
Field Summary | |
protected static boolean |
DEBUG
Our debug flag status (Used to compile out debugging information). |
Fields inherited from interface org.apache.catalina.Lifecycle |
START_EVENT, STOP_EVENT |
Constructor Summary | |
WarpHandler()
Construct a new instance of a WarpHandler. |
Method Summary | |
void |
addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component. |
protected void |
debug(java.lang.Exception exc)
Dump information for an Exception. |
protected void |
debug(java.lang.String msg)
Dump a debug message. |
protected WarpConnection |
getConnection()
Return the WarpConnection associated with this handler. |
protected WarpConnector |
getConnector()
Return the WarpConnector associated with this handler. |
protected int |
getRequestID()
Return the Request ID associated with this handler. |
protected void |
log(java.lang.Exception exc)
Log an exception. |
protected void |
log(java.lang.String msg)
Log a message. |
abstract boolean |
process(int type,
byte[] buffer)
Process a WARP packet. |
protected void |
processData(int type,
byte[] buffer)
Receive notification of data from a WarpConnection. |
void |
removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component. |
void |
run()
Process WARP packets. |
void |
send(int type,
byte[] buffer)
Send a WARP packet. |
void |
send(int type,
byte[] buffer,
int offset,
int len)
Send a WARP packet. |
void |
send(int type,
WarpPacket packet)
Send a WARP packet. |
protected void |
setConnection(WarpConnection connection)
Set the WarpConnection associated with this handler. |
protected void |
setRequestID(int rid)
Set the Request ID associated with this handler. |
void |
start()
Initialize this handler instance. |
void |
stop()
Stop this handler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final boolean DEBUG
Constructor Detail |
public WarpHandler()
Method Detail |
public final void run()
run
in interface java.lang.Runnable
public final void start() throws LifecycleException
start
in interface Lifecycle
org.apache.catalina.Lifecycle
IllegalStateException
- if this component has already been
startedLifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic final void stop()
stop
in interface Lifecycle
org.apache.catalina.Lifecycle
IllegalStateException
- if this component has not been startedLifecycleException
- if this component detects a fatal error
that needs to be reportedprotected final void processData(int type, byte[] buffer)
type
- The WARP packet type.buffer
- The WARP packet payload.public final void send(int type, byte[] buffer, int offset, int len) throws java.io.IOException
type
- The WARP packet type.buffer
- The buffer containing the data to send.off
- The offset in the buffer of the data to send.len
- The number of bytes to send.java.io.IOException
- If something happened sending the data.public final void send(int type, WarpPacket packet) throws java.io.IOException
type
- The WARP packet type.packet
- The packet to write.java.io.IOException
- If something happened sending the data.public final void send(int type, byte[] buffer) throws java.io.IOException
type
- The WARP packet type.buffer
- The buffer containing the data to send.java.io.IOException
- If something happened sending the data.public abstract boolean process(int type, byte[] buffer)
type
- The WARP packet type.buffer
- The WARP packet payload.public void addLifecycleListener(LifecycleListener listener)
addLifecycleListener
in interface Lifecycle
org.apache.catalina.Lifecycle
listener
- The listener to addpublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener
in interface Lifecycle
org.apache.catalina.Lifecycle
listener
- The listener to removeprotected WarpConnection getConnection()
protected WarpConnector getConnector()
protected void setConnection(WarpConnection connection)
protected int getRequestID()
protected void setRequestID(int rid)
protected void log(java.lang.String msg)
msg
- The error message to log.protected void log(java.lang.Exception exc)
e
- The exception to log.protected void debug(java.lang.String msg)
protected void debug(java.lang.Exception exc)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |