|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzj.unicore.wsrflite.xmlbeans.client.BaseWSRFClient
public class BaseWSRFClient
A basic WSRF client. Allows to access remote (wsrf) services
| Field Summary | |
|---|---|
protected org.w3.x2005.x08.addressing.EndpointReferenceType |
epr
|
protected static org.apache.log4j.Logger |
logger
|
protected XFireClientFactory |
proxyMaker
|
protected ReliableProxy.RetryDecider |
retryDecider
|
protected ISecurityProperties |
securityProperties
|
protected String |
url
|
| Constructor Summary | |
|---|---|
BaseWSRFClient(org.w3.x2005.x08.addressing.EndpointReferenceType epr)
create a Client to connect to service at 'epr' using the transport 'url' |
|
BaseWSRFClient(String endpointUrl,
org.w3.x2005.x08.addressing.EndpointReferenceType epr)
create a Client to connect to service at 'epr' using the transport 'url' |
|
BaseWSRFClient(String endpointUrl,
org.w3.x2005.x08.addressing.EndpointReferenceType epr,
ISecurityProperties sec)
create a new wsrf client instance |
|
BaseWSRFClient(String endpointUrl,
org.w3.x2005.x08.addressing.EndpointReferenceType epr,
ISecurityProperties sec,
XFireClientFactory clientFactory)
create a new wsrf client instance |
|
| Method Summary | ||
|---|---|---|
boolean |
checkConnection()
check the connection to the service |
|
boolean |
checkConnection(int timeout)
check the connection to the WSRF service by calling getCurrentTime(). |
|
void |
destroy()
destroy a WS-Resource |
|
String |
getConnectionStatus()
check the connection status to the service |
|
Calendar |
getCurrentTime()
get the current time of a WS-Resource |
|
org.w3.x2005.x08.addressing.EndpointReferenceType |
getEPR()
get the EPR this client points to |
|
ResourceLifetime |
getLT()
|
|
Map<QName,org.apache.xmlbeans.XmlObject[]> |
getMultipleResourceProperties(QName... names)
get multiple resource properties |
|
String |
getResourceProperty(QName rpQname)
retrieve a resource property This is returned as a String, so you can easily build an XMLBeans object from it |
|
String |
getResourcePropertyDocument()
get a string containing all resourceproperties |
|
org.oasisOpen.docs.wsrf.rp2.GetResourcePropertyDocumentResponseDocument |
GetResourcePropertyDocument()
get a document containing all resourceproperties |
|
ResourceProperties |
getRP()
lazily creates the proxy for the ResourceProperties interface |
|
ISecurityProperties |
getSecurityProperties()
get the security properties used by this client |
|
Calendar |
getTerminationTime()
get the termination time of a WS-Resource |
|
long |
getUpdateInterval()
retrieves the minimum time between subsequent remote GetResourcePropertyDocument() calls. |
|
String |
getUrl()
get the URL this client talks to |
|
|
makeProxy(Class<T> iFace)
convenience method to create a proxy object for the given interface |
|
org.oasisOpen.docs.wsrf.rp2.QueryResourcePropertiesResponseDocument |
queryResourceProperties(String xpath)
perform an xpath query on the resourceproperties |
|
void |
setConnectionTimeout(int timeout)
set the connection timeout for this client. |
|
protected void |
setConnectionTimeout(Object proxy,
int timeout)
sets the timeout on the given proxy object |
|
void |
setRetryHandler(ReliableProxy.RetryDecider retry)
set the ReliableProxy.RetryDecider that decides whether a failed ws call
shall be retried |
|
Calendar |
setTerminationTime(Calendar newTerminationTime)
set the termination time of a WS-Resource |
|
void |
setUpdateInterval(long updateInterval)
Sets the update interval, i.e. the minimum time between subsequent remote GetResourcePropertyDocument() calls. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger logger
protected final org.w3.x2005.x08.addressing.EndpointReferenceType epr
protected final String url
protected ISecurityProperties securityProperties
protected final XFireClientFactory proxyMaker
protected ReliableProxy.RetryDecider retryDecider
| Constructor Detail |
|---|
public BaseWSRFClient(org.w3.x2005.x08.addressing.EndpointReferenceType epr)
throws Exception
epr -
Exception
public BaseWSRFClient(String endpointUrl,
org.w3.x2005.x08.addressing.EndpointReferenceType epr)
throws Exception
endpointUrl - epr -
Exception
public BaseWSRFClient(String endpointUrl,
org.w3.x2005.x08.addressing.EndpointReferenceType epr,
ISecurityProperties sec)
throws Exception
endpointUrl - the url to connect toepr - the service EPR for WS-Addressingsec - SecurityProperties to use
ExceptionISecurityProperties
public BaseWSRFClient(String endpointUrl,
org.w3.x2005.x08.addressing.EndpointReferenceType epr,
ISecurityProperties sec,
XFireClientFactory clientFactory)
throws Exception
endpointUrl - the url to connect toepr - the service EPR for WS-Addressingsec - SecurityProperties to useclientFactory - the client factory to use
ExceptionISecurityProperties| Method Detail |
|---|
public org.w3.x2005.x08.addressing.EndpointReferenceType getEPR()
public String getUrl()
public ISecurityProperties getSecurityProperties()
public <T> T makeProxy(Class<T> iFace)
throws Exception
iFace -
Exception
public String getResourceProperty(QName rpQname)
throws BaseFault,
InvalidResourcePropertyQNameFault,
ResourceUnavailableFault,
ResourceUnknownFault,
ClientException
in -
BaseFault
InvalidResourcePropertyQNameFault
ResourceUnavailableFault
ResourceUnknownFault
ClientException
public void destroy()
throws BaseFault,
ResourceUnavailableFault,
ResourceUnknownFault,
ResourceNotDestroyedFault,
ClientException
BaseFault
ResourceUnavailableFault
ResourceUnknownFault
ResourceNotDestroyedFault
ClientException
public Calendar setTerminationTime(Calendar newTerminationTime)
throws BaseFault,
UnableToSetTerminationTimeFault,
TerminationTimeChangeRejectedFault,
ResourceUnavailableFault,
ResourceUnknownFault,
ClientException
newTerminationTime -
Exception
BaseFault
UnableToSetTerminationTimeFault
TerminationTimeChangeRejectedFault
ResourceUnavailableFault
ResourceUnknownFault
ClientException
public Calendar getTerminationTime()
throws BaseFault,
InvalidResourcePropertyQNameFault,
ResourceUnavailableFault,
ResourceUnknownFault,
ClientException
Exception
BaseFault
InvalidResourcePropertyQNameFault
ResourceUnavailableFault
ResourceUnknownFault
ClientException
public Calendar getCurrentTime()
throws BaseFault,
ResourceUnavailableFault,
ResourceUnknownFault,
ClientException
newTerminationTime -
Exception
BaseFault
ResourceUnavailableFault
ResourceUnknownFault
ClientException
public String getResourcePropertyDocument()
throws BaseFault,
ResourceUnknownFault,
ResourceUnavailableFault,
ClientException
Exception
BaseFault
ResourceUnknownFault
ResourceUnavailableFault
ClientException
public org.oasisOpen.docs.wsrf.rp2.GetResourcePropertyDocumentResponseDocument GetResourcePropertyDocument()
throws BaseFault,
ResourceUnknownFault,
ResourceUnavailableFault,
ClientException
Exception
BaseFault
ResourceUnknownFault
ResourceUnavailableFault
ClientException
public org.oasisOpen.docs.wsrf.rp2.QueryResourcePropertiesResponseDocument queryResourceProperties(String xpath)
throws BaseFault,
ResourceUnknownFault,
ResourceUnavailableFault,
ClientException
BaseFault
ResourceUnknownFault
ResourceUnavailableFault
ClientException
public Map<QName,org.apache.xmlbeans.XmlObject[]> getMultipleResourceProperties(QName... names)
throws BaseFault,
ResourceUnknownFault,
ResourceUnavailableFault,
ClientException
names - - the QNames of the RPs to get
Exception
BaseFault
ResourceUnknownFault
ResourceUnavailableFault
ClientException
public ResourceLifetime getLT()
throws ClientException
ClientException
public ResourceProperties getRP()
throws ClientException
RuntimeException - - wraps any exception as a runtime exception
ClientExceptionpublic void setRetryHandler(ReliableProxy.RetryDecider retry)
ReliableProxy.RetryDecider that decides whether a failed ws call
shall be retried
retry - - the ReliableProxy.RetryDeciderpublic long getUpdateInterval()
public void setUpdateInterval(long updateInterval)
updateInterval - getUpdateInterval()
public String getConnectionStatus()
throws ClientException
ClientException
public boolean checkConnection()
throws ClientException
ClientException
public boolean checkConnection(int timeout)
throws ClientException
false
timeout - - connection timeout in milliseconds
ClientException
public void setConnectionTimeout(int timeout)
throws ClientException
public void setConnectionTimeout(int timeout){
super.setConnectionTimeout(timeout):
setConnectionTimeout(yourProxy, timeout);
}
where yourProxy is the proxy object for
the
timeout - - timeout in millis
ClientException
protected void setConnectionTimeout(Object proxy,
int timeout)
proxy - - the web service proxytimeout - - the timeout in millis
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||