Class WsDiscoveryTargetServiceInterceptor
- java.lang.Object
-
- org.somda.sdc.dpws.soap.wsdiscovery.WsDiscoveryTargetServiceInterceptor
-
- All Implemented Interfaces:
Interceptor,WsDiscoveryTargetService
public class WsDiscoveryTargetServiceInterceptor extends Object implements WsDiscoveryTargetService
Default implementation of the WsDiscoveryTargetService.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EndpointReferenceTypegetEndpointReference()MatchBygetMatchBy()Thread-safe function to get the MatchBy rule.com.google.common.primitives.UnsignedIntegergetMetadataVersion()Thread-safe function to get the metadata version.List<String>getScopes()Thread-safe function to get the list of scope URIs.List<QName>getTypes()Thread-safe function to get the list of QNames.List<String>getXAddrs()Thread-safe function to get the list of XAddr URIs.com.google.common.primitives.UnsignedIntegerincMetadataVersionAndGet()Increments the metadata version and retrieves the new value.com.google.common.primitives.UnsignedIntegerincMetadataVersionIfModifiedAndGet()Increments the metadata version and retrieve the new value if the metadata has changed, returns previous version otherwise.voidsendBye()Blocking function to send out a Bye message.com.google.common.primitives.UnsignedIntegersendHello()Blocking function to send out a Hello message.com.google.common.primitives.UnsignedIntegersendHello(boolean forceNewMetadataVersion)Blocking function to send out a Hello message.voidsetMatchBy(MatchBy matchBy)Thread-safe function to set the MatchBy rule.voidsetMetadataModified()Thread-safe function to explicitly set the target service metadata to be modified (thread-safe).voidsetScopes(List<String> uris)Thread-safe function to set the list of scope URIs.voidsetTypes(List<QName> qNames)Thread-safe function to set the list of QNames.voidsetXAddrs(List<String> xAddrs)Thread-safe function to set the list of XAddr URIs.
-
-
-
Method Detail
-
getEndpointReference
public EndpointReferenceType getEndpointReference()
- Specified by:
getEndpointReferencein interfaceWsDiscoveryTargetService
-
setTypes
public void setTypes(List<QName> qNames)
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to set the list of QNames.- Specified by:
setTypesin interfaceWsDiscoveryTargetService- Parameters:
qNames- the list of QNames to set.
-
getTypes
public List<QName> getTypes()
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to get the list of QNames.- Specified by:
getTypesin interfaceWsDiscoveryTargetService- Returns:
- the list of QNames.
-
setScopes
public void setScopes(List<String> uris)
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to set the list of scope URIs.- Specified by:
setScopesin interfaceWsDiscoveryTargetService- Parameters:
uris- the list of scope URIs to set.
-
getScopes
public List<String> getScopes()
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to get the list of scope URIs.- Specified by:
getScopesin interfaceWsDiscoveryTargetService- Returns:
- the list of scope URIs.
-
setXAddrs
public void setXAddrs(List<String> xAddrs)
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to set the list of XAddr URIs.- Specified by:
setXAddrsin interfaceWsDiscoveryTargetService- Parameters:
xAddrs- the list of XAddr URIs.
-
getXAddrs
public List<String> getXAddrs()
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to get the list of XAddr URIs.- Specified by:
getXAddrsin interfaceWsDiscoveryTargetService- Returns:
- the list of XAddr URIs.
-
setMatchBy
public void setMatchBy(MatchBy matchBy)
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to set the MatchBy rule.- Specified by:
setMatchByin interfaceWsDiscoveryTargetService- Parameters:
matchBy- the MatchBy rule to set.
-
getMatchBy
public MatchBy getMatchBy()
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to get the MatchBy rule.- Specified by:
getMatchByin interfaceWsDiscoveryTargetService- Returns:
- the MatchBy rule.
-
setMetadataModified
public void setMetadataModified()
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to explicitly set the target service metadata to be modified (thread-safe).This is useful if the metadata change does not belong to, e.g., Types and Scopes.
- Specified by:
setMetadataModifiedin interfaceWsDiscoveryTargetService
-
getMetadataVersion
public com.google.common.primitives.UnsignedInteger getMetadataVersion()
Description copied from interface:WsDiscoveryTargetServiceThread-safe function to get the metadata version.- Specified by:
getMetadataVersionin interfaceWsDiscoveryTargetService- Returns:
- the metadata version.
-
sendHello
public com.google.common.primitives.UnsignedInteger sendHello() throws MarshallingException, TransportException, InterceptorExceptionDescription copied from interface:WsDiscoveryTargetServiceBlocking function to send out a Hello message.This is a shorthand function to
WsDiscoveryTargetService.sendHello(boolean).- Specified by:
sendHelloin interfaceWsDiscoveryTargetService- Returns:
- the metadata version that has been attached to the Hello message.
- Throws:
MarshallingException- if marshalling the Hello message fails.TransportException- if there is any problem on the transport layer.InterceptorException- if one of the interceptors pops up with an error.
-
sendHello
public com.google.common.primitives.UnsignedInteger sendHello(boolean forceNewMetadataVersion) throws MarshallingException, TransportException, InterceptorExceptionDescription copied from interface:WsDiscoveryTargetServiceBlocking function to send out a Hello message.- Specified by:
sendHelloin interfaceWsDiscoveryTargetService- Parameters:
forceNewMetadataVersion- set to true to force incrementing the metadata version, or false to not do so.- Returns:
- the metadata version that has been attached to the Hello message.
- Throws:
MarshallingException- if marshalling the Hello message fails.TransportException- if there is any problem on the transport layer.InterceptorException- if one of the interceptors pops up with an error.
-
sendBye
public void sendBye() throws MarshallingException, TransportException, InterceptorExceptionDescription copied from interface:WsDiscoveryTargetServiceBlocking function to send out a Bye message.- Specified by:
sendByein interfaceWsDiscoveryTargetService- Throws:
MarshallingException- if marshalling the Bye message fails.TransportException- if there is any problem on the transport layer.InterceptorException- if one of the interceptors pops up with an error.
-
incMetadataVersionAndGet
public com.google.common.primitives.UnsignedInteger incMetadataVersionAndGet()
Increments the metadata version and retrieves the new value.- Returns:
- new metadata version
-
incMetadataVersionIfModifiedAndGet
public com.google.common.primitives.UnsignedInteger incMetadataVersionIfModifiedAndGet()
Increments the metadata version and retrieve the new value if the metadata has changed, returns previous version otherwise.- Returns:
- metadata version
-
-