Package org.somda.sdc.dpws.service
Class HostingServiceProxyImpl
- java.lang.Object
-
- org.somda.sdc.dpws.service.HostingServiceProxyImpl
-
- All Implemented Interfaces:
HostingServiceProxy,InterceptorHandler,RequestResponseClient
public class HostingServiceProxyImpl extends Object implements HostingServiceProxy
Default implementation of HostingServiceProxy.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetActiveXAddr()Gets the physical address that is actively being used to send requests.StringgetEndpointReferenceAddress()Gets the unique WS-Discovery target service EPR.Map<String,HostedServiceProxy>getHostedServices()Gets all hosted service proxies.longgetMetadataVersion()Gets the metadata version.RequestResponseClientgetRequestResponseClient()Optional<ThisDeviceType>getThisDevice()Gets the DPWS ThisDevice information.Optional<ThisModelType>getThisModel()Gets the DPWS ThisModel information.List<QName>getTypes()Gets types of the hosting service.voidregister(Interceptor interceptor)Registers a callback object.SoapMessagesendRequestResponse(SoapMessage request)Sends a SOAP request message and waits for the response to be received from the recipient.StringtoString()
-
-
-
Method Detail
-
getEndpointReferenceAddress
public String getEndpointReferenceAddress()
Description copied from interface:HostingServiceProxyGets the unique WS-Discovery target service EPR.If TLS is enforced, the value of the endpoint reference address as returned by this function is trustworthy (opposed to
DiscoveredDevice.getEprAddress(), which is potentially retrieved via unsecured UDP).- Specified by:
getEndpointReferenceAddressin interfaceHostingServiceProxy- Returns:
- WS-Discovery target service EPR.
-
getTypes
public List<QName> getTypes()
Description copied from interface:HostingServiceProxyGets types of the hosting service.- Specified by:
getTypesin interfaceHostingServiceProxy- Returns:
- list of types, which classifies the hosting service.
-
getThisModel
public Optional<ThisModelType> getThisModel()
Description copied from interface:HostingServiceProxyGets the DPWS ThisModel information.- Specified by:
getThisModelin interfaceHostingServiceProxy- Returns:
- ThisModel information.
-
getThisDevice
public Optional<ThisDeviceType> getThisDevice()
Description copied from interface:HostingServiceProxyGets the DPWS ThisDevice information.- Specified by:
getThisDevicein interfaceHostingServiceProxy- Returns:
- ThisDevice information.
-
getHostedServices
public Map<String,HostedServiceProxy> getHostedServices()
Description copied from interface:HostingServiceProxyGets all hosted service proxies.- Specified by:
getHostedServicesin interfaceHostingServiceProxy- Returns:
- all hosted services.
-
getActiveXAddr
public String getActiveXAddr()
Description copied from interface:HostingServiceProxyGets the physical address that is actively being used to send requests.A hosting service can have different physical addresses in order to be accessible. The one that is returned with this function is the one that was used to initially resolve metadata (GetTransfer requests).
- Specified by:
getActiveXAddrin interfaceHostingServiceProxy- Returns:
- the currently active EPR address.
-
getMetadataVersion
public long getMetadataVersion()
Description copied from interface:HostingServiceProxyGets the metadata version.Attention: this data might have come from an unreliable source. todo DGr remove that function - the metadata version does not necessarily reflect the hosting service data
- Specified by:
getMetadataVersionin interfaceHostingServiceProxy- Returns:
- the metadata version
-
getRequestResponseClient
public RequestResponseClient getRequestResponseClient()
- Specified by:
getRequestResponseClientin interfaceHostingServiceProxy
-
register
public void register(Interceptor interceptor)
Description copied from interface:InterceptorHandlerRegisters a callback object.- Specified by:
registerin interfaceInterceptorHandler- Parameters:
interceptor- an object that possessesMessageInterceptorannotated methods.- See Also:
MessageInterceptor
-
sendRequestResponse
public SoapMessage sendRequestResponse(SoapMessage request) throws SoapFaultException, MarshallingException, TransportException, InterceptorException
Description copied from interface:RequestResponseClientSends a SOAP request message and waits for the response to be received from the recipient.- Specified by:
sendRequestResponsein interfaceRequestResponseClient- Parameters:
request- outgoing request message.- Returns:
- incoming response message.
- Throws:
SoapFaultException- if a SOAP fault comes up during processing.MarshallingException- if any exception occurs during marshalling or unmarshalling of SOAP messages.TransportException- if transport-related exceptions come up during processing. This will hinder the response from being sent.InterceptorException- if one of the interceptors pops up with an error.
-
-