org.gcube.informationsystem.notifier.util
Class Util

java.lang.Object
  extended by org.gcube.informationsystem.notifier.util.Util

public class Util
extends java.lang.Object

Author:
Christoph Langguth

Constructor Summary
Util()
           
 
Method Summary
static boolean isEndpointReachable(org.apache.axis.message.addressing.EndpointReferenceType epr)
          Determines whether a given EndpointReference is reachable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

isEndpointReachable

public static boolean isEndpointReachable(org.apache.axis.message.addressing.EndpointReferenceType epr)
Determines whether a given EndpointReference is reachable. The rationale for the existence of this method is the following: in Globus, there is no way to differenciate between a connection timeout and a socket timeout. Since the execution engine cannot know in advance how long a service invocation is supposed to take, the socket timeout is set to infinite in the engine. This, however, creates a problem when an endpoint is not reachable (firewalled or otherwise not responding), because the system will hang forever, while not even being connected to the endpoint. Therefore, it is advisable to call this method before making the actual service request. This method merely tries to establish a socket connection to the given EPR, which is immediately closed; however it times out after a reasonable amount of time (5 seconds).

Parameters:
epr - the EPR to check for availability
Returns:
true if a successful socket connection could be established, false if there was a problem with the parameters, or if the connection could not be established.
See Also:
SOCKET_CONNECT_TIMEOUT_MS