uk.org.ogsadai.client.toolkit.service
Class SimpleSOAPCallFactory
java.lang.Object
|
+--uk.org.ogsadai.client.toolkit.service.SimpleSOAPCallFactory
- All Implemented Interfaces:
- java.lang.Cloneable, SOAPCallFactory
- public class SimpleSOAPCallFactory
- extends java.lang.Object
- implements SOAPCallFactory, java.lang.Cloneable
A simple thread-safe implementation of the SOAPCallFactory
interface. Synchronization takes place when default properties are added and when properties are set for a new SOAPCall
object.
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement. |
private java.util.Map |
mSoapProperties
Properties to apply to all SOAP calls. |
private int |
mTimeout
Timeout to use for SOAP calls. |
Method Summary |
java.lang.Object |
clone()
Creates a new SOAPCallFactory that inherits the default settings from this factory. |
SOAPCall |
createSOAPCall()
Creates and returns a new SOAPCall object. |
void |
setDefaultProperty(java.lang.String name, java.lang.Object value)
Sets a default property that will be applied to SOAPCall objects that are created subsequently. |
void |
setDefaultTimeout(int duration)
Sets the default timeout value for SOAPCall objects that are created subsequently. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement.
- See Also:
- Constant Field Values
mTimeout
private int mTimeout
-
Timeout to use for SOAP calls.
mSoapProperties
private final java.util.Map mSoapProperties
-
Properties to apply to all SOAP calls.
SimpleSOAPCallFactory
public SimpleSOAPCallFactory()
-
Constructs a new
SimpleSOAPCallFactory
.
SimpleSOAPCallFactory
private SimpleSOAPCallFactory(int timeout,
java.util.Map properties)
createSOAPCall
public SOAPCall createSOAPCall()
-
Creates and returns a new
SOAPCall
object. If a timeout has been specified the timeout of the underlying Axis call object is set with this timeout.
-
- Specified by:
createSOAPCall
in interface SOAPCallFactory
-
- Returns:
- new
SOAPCall
object.
setDefaultProperty
public void setDefaultProperty(java.lang.String name,
java.lang.Object value)
- Description copied from interface:
SOAPCallFactory
-
Sets a default property that will be applied to
SOAPCall
objects that are created subsequently.
-
- Specified by:
setDefaultProperty
in interface SOAPCallFactory
-
- Parameters:
name
- property name
value
- property value
setDefaultTimeout
public void setDefaultTimeout(int duration)
- Description copied from interface:
SOAPCallFactory
-
Sets the default timeout value for
SOAPCall
objects that are created subsequently.
-
- Specified by:
setDefaultTimeout
in interface SOAPCallFactory
-
- Parameters:
duration
- timeout duration in milliseconds. A value of less than zero can be specified to prevent the factory from setting the timeout.
clone
public java.lang.Object clone()
- Description copied from interface:
SOAPCallFactory
-
Creates a new
SOAPCallFactory
that inherits the default settings from this factory.
-
- Specified by:
clone
in interface SOAPCallFactory
- Overrides:
clone
in class java.lang.Object
-
- Returns:
- a new
SOAPCallFactory