|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Thread
org.globus.wsrf.container.ServiceThread
This class is responsible for reading the request from the request queue, format it, and pass it through the Axis engine.
| Field Summary | |
private static byte[] |
ACTION_HEADER
|
private String |
baseURL
|
private byte[] |
buf
|
private static int |
BUFSIZ
|
private boolean |
chunked
|
private static byte[] |
CHUNKED
|
private String |
configRootPath
|
private static byte[] |
CONNECTION_CLOSE
|
protected static byte[] |
CONTENT_LENGTH
|
protected static String |
CONTENT_TYPE
|
private static byte[] |
ENCODING_HEADER
|
private AxisEngine |
engine
|
private static String |
FILE_NOT_FOUND
|
private static byte[] |
FILE_NOT_FOUND_MSG
|
private StringBuffer |
fileName
|
private static byte[] |
GET_HEADER
|
private static byte[] |
HEAD_HEADER
|
private static byte[] |
HEADER_ENDER
|
protected static byte[] |
HTML_MIME_STUFF
|
protected static byte[] |
HTTP_10
|
protected static byte[] |
HTTP_11
|
private static byte[] |
HTTP_BASE_VERSION
|
private static int |
HTTP_GET
|
private static int |
HTTP_HEAD
|
private static int |
HTTP_POST
|
protected boolean |
http11
|
private int |
httpRequest
|
private static org.globus.util.I18n |
i18n
|
private NonBlockingBufferedInputStream |
is
|
private static byte[] |
ISE
|
protected static byte[] |
JAR_MIME_STUFF
|
protected static byte[] |
JNLP_MIME_STUFF
|
private static byte[] |
LENGTH_HEADER
|
private static org.apache.commons.logging.Log |
logger
|
protected MessageContext |
msgContext
|
private static byte[] |
OK
|
(package private) static PerformanceLog |
performanceLogger
|
(package private) static PerformanceLog |
performanceProcessLogger
|
private static byte[] |
POST_HEADER
|
private ServiceRequestQueue |
queue
|
private Message |
responseMsg
|
static String |
SEND_CONTENT_LENGTH
|
private boolean |
sendContentLength
|
protected static byte[] |
SEPARATOR
|
private StringBuffer |
soapAction
|
private ServiceThreadPool |
threadPool
|
private static byte[] |
toLower
|
private static byte[] |
TRANSFER_ENCODING_CHUNKED
|
protected static byte[] |
UNAUTH
|
private String |
webRootPath
|
private boolean |
webStartEnabled
|
protected static byte[] |
XML_MIME_STUFF
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
ServiceThread(ServiceRequestQueue queue,
ServiceThreadPool pool,
AxisEngine engine)
|
|
| Method Summary | |
private byte[] |
createHeaderReply(byte[] code,
byte[] contentType,
long length)
|
protected byte[] |
doFault(Exception e,
MessageContext msgContext,
String filepart)
|
protected void |
doGet(AxisEngine engine,
MessageContext msgContext,
OutputStream out,
String filePart,
boolean returnContent)
|
protected void |
doGetSub(AxisEngine engine,
MessageContext msgContext,
OutputStream out,
String filePart,
boolean returnContent)
|
protected void |
doPost(AxisEngine engine,
MessageContext msgContext)
|
protected void |
doWSDL(AxisEngine engine,
MessageContext msgContext,
OutputStream out,
String filePart)
|
static String |
getConfigRootPath(AxisEngine engine)
|
private static String |
getHost(AxisEngine engine)
|
protected String |
getProtocol()
|
static String |
getWebRootPath(AxisEngine engine)
|
private void |
handleOutOfMemoryError()
|
boolean |
matches(byte[] buf,
byte[] target)
does tolower[buf] match the target byte array, up to the target's length? |
boolean |
matches(byte[] buf,
int bufIdx,
byte[] target)
Case-insensitive match of a target byte [] to a source byte [], starting from a particular offset into the source. |
private int |
parseHeaders(InputStream is,
StringBuffer soapAction,
StringBuffer fileName)
Read all mime headers, returning the value of Content-Length and SOAPAction. |
private void |
parseRequest(StringBuffer fileName,
byte[] buf,
int n,
int offset)
|
protected void |
process(ServiceRequest request)
|
private void |
putInt(OutputStream out,
int value)
output an integer into the output stream |
private int |
readLine(InputStream is,
byte[] b,
int off,
int len)
Read a single line from the input stream |
private void |
reset()
|
void |
run()
|
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static org.apache.commons.logging.Log logger
private static org.globus.util.I18n i18n
private ServiceRequestQueue queue
private ServiceThreadPool threadPool
private AxisEngine engine
protected MessageContext msgContext
private NonBlockingBufferedInputStream is
private Message responseMsg
private StringBuffer soapAction
private StringBuffer fileName
private int httpRequest
private boolean sendContentLength
protected boolean http11
private boolean chunked
static PerformanceLog performanceLogger
static PerformanceLog performanceProcessLogger
public static final String SEND_CONTENT_LENGTH
protected static final byte[] HTTP_10
protected static final byte[] HTTP_11
private static final byte[] OK
protected static final byte[] UNAUTH
private static final byte[] ISE
private static final String FILE_NOT_FOUND
private static final byte[] FILE_NOT_FOUND_MSG
protected static final byte[] XML_MIME_STUFF
protected static final byte[] HTML_MIME_STUFF
protected static final byte[] JNLP_MIME_STUFF
protected static final byte[] JAR_MIME_STUFF
protected static final String CONTENT_TYPE
protected static final byte[] CONTENT_LENGTH
private static final byte[] CONNECTION_CLOSE
private static final byte[] TRANSFER_ENCODING_CHUNKED
protected static final byte[] SEPARATOR
private static final byte[] toLower
private static final byte[] LENGTH_HEADER
private static final byte[] ACTION_HEADER
private static final byte[] GET_HEADER
private static final byte[] HEAD_HEADER
private static final byte[] POST_HEADER
private static final byte[] HEADER_ENDER
private static final byte[] ENCODING_HEADER
private static final byte[] CHUNKED
private static final byte[] HTTP_BASE_VERSION
private static final int HTTP_GET
private static final int HTTP_HEAD
private static final int HTTP_POST
private static final int BUFSIZ
private byte[] buf
private String webRootPath
private boolean webStartEnabled
private String configRootPath
private String baseURL
| Constructor Detail |
public ServiceThread(ServiceRequestQueue queue,
ServiceThreadPool pool,
AxisEngine engine)
| Method Detail |
private static String getHost(AxisEngine engine)
throws IOException
IOException
public static String getWebRootPath(AxisEngine engine)
throws IOException
IOExceptionpublic static String getConfigRootPath(AxisEngine engine)
private void reset()
private void handleOutOfMemoryError()
public void run()
protected String getProtocol()
protected void process(ServiceRequest request)
private byte[] createHeaderReply(byte[] code,
byte[] contentType,
long length)
throws IOException
IOException
protected void doWSDL(AxisEngine engine,
MessageContext msgContext,
OutputStream out,
String filePart)
throws IOException
IOException
protected void doGet(AxisEngine engine,
MessageContext msgContext,
OutputStream out,
String filePart,
boolean returnContent)
protected void doGetSub(AxisEngine engine,
MessageContext msgContext,
OutputStream out,
String filePart,
boolean returnContent)
throws IOException
IOException
protected void doPost(AxisEngine engine,
MessageContext msgContext)
throws AxisFault
AxisFault
protected byte[] doFault(Exception e,
MessageContext msgContext,
String filepart)
private int readLine(InputStream is,
byte[] b,
int off,
int len)
throws IOException
is - inputstream to read fromb - byte array to read intooff - starting offset into the byte arraylen - maximum number of bytes to read
IOException
private void parseRequest(StringBuffer fileName,
byte[] buf,
int n,
int offset)
throws IOException
IOException
private int parseHeaders(InputStream is,
StringBuffer soapAction,
StringBuffer fileName)
throws IOException
is - InputStream to read fromsoapAction - StringBuffer to return the soapAction into
IOException
public boolean matches(byte[] buf,
byte[] target)
public boolean matches(byte[] buf,
int bufIdx,
byte[] target)
private void putInt(OutputStream out,
int value)
throws IOException
out - OutputStream to be written tovalue - Integer value to be written.
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||