com.gridsystems.innergrid.api
Class InterruptibleHttpSender

java.lang.Object
  extended by org.apache.axis.handlers.BasicHandler
      extended by org.apache.axis.transport.http.HTTPSender
          extended by com.gridsystems.innergrid.api.InterruptibleHttpSender
All Implemented Interfaces:
java.io.Serializable, org.apache.axis.Handler

public class InterruptibleHttpSender
extends org.apache.axis.transport.http.HTTPSender

HTTPSender modified to allow interruption during I/O read.

Author:
Rodrigo Ruiz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.axis.transport.http.HTTPSender
log
 
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
 
Constructor Summary
InterruptibleHttpSender()
           
 
Method Summary
protected  void getSocket(org.apache.axis.transport.http.SocketHolder sockHolder, org.apache.axis.MessageContext msgContext, java.lang.String protocol, java.lang.String host, int port, int timeout, java.lang.StringBuffer otherHeaders, org.apache.axis.components.net.BooleanHolder useFullURL)
          
static void interrupt(java.lang.Thread t)
          Interrupts the specified thread operation by closing its associated socket.
 void invoke(org.apache.axis.MessageContext msgContext)
          
static boolean isBlocked(java.lang.Thread t)
          Gets if the specified thread is blocked performing a remote call to a web service.
 
Methods inherited from class org.apache.axis.transport.http.HTTPSender
handleCookie
 
Methods inherited from class org.apache.axis.handlers.BasicHandler
canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterruptibleHttpSender

public InterruptibleHttpSender()
Method Detail

interrupt

public static void interrupt(java.lang.Thread t)
Interrupts the specified thread operation by closing its associated socket.

Parameters:
t - The thread to interrupt

isBlocked

public static boolean isBlocked(java.lang.Thread t)
Gets if the specified thread is blocked performing a remote call to a web service.

A so blocked thread can can be interrupted by calling interrupt(Thread).

Parameters:
t - The thread to check
Returns:
true if t can be interrupted

invoke

public void invoke(org.apache.axis.MessageContext msgContext)
            throws org.apache.axis.AxisFault

Specified by:
invoke in interface org.apache.axis.Handler
Overrides:
invoke in class org.apache.axis.transport.http.HTTPSender
Throws:
org.apache.axis.AxisFault

getSocket

protected void getSocket(org.apache.axis.transport.http.SocketHolder sockHolder,
                         org.apache.axis.MessageContext msgContext,
                         java.lang.String protocol,
                         java.lang.String host,
                         int port,
                         int timeout,
                         java.lang.StringBuffer otherHeaders,
                         org.apache.axis.components.net.BooleanHolder useFullURL)
                  throws java.lang.Exception

Overrides:
getSocket in class org.apache.axis.transport.http.HTTPSender
Throws:
java.lang.Exception


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.