public class DPWSCommunicationManager extends java.lang.Object implements CommunicationManagerInternal
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMUNICATION_MANAGER_ID |
ID_NULL| Constructor and Description |
|---|
DPWSCommunicationManager()
Public default constructor, needed for reflective instance creation (
Class.forName(...) ). |
| Modifier and Type | Method and Description |
|---|---|
QNameSet |
adaptDeviceTypes(QNameSet qnames)
CommunicationManager specific adaptation of device-types.
|
QNameSet |
adaptServiceTypes(QNameSet qnames)
CommunicationManager specific adaptation of service-types.
|
protected void |
checkAndSendTCPMessage(Message message,
ResponseCallback callback,
XAddressInfo targetXAddrInfo,
CredentialInfo credentialInfo) |
java.lang.String |
checkIfAddressIsAnyLocalThenInterface(java.lang.String addr,
ConnectionInfo connectionInfo) |
boolean |
containsAllDeviceTypes(QNameSet searchTypes,
QNameSet types) |
boolean |
containsAllSearchScopes(ScopeSet searchScopes,
ScopeSet deviceScopes) |
boolean |
containsAllServiceTypes(QNameSet searchTypes,
QNameSet types) |
FaultMessage |
createActionNotSupportedFault(Message request,
java.lang.String actionString,
ProtocolInfo protocolInfo)
Faults
|
FaultMessage |
createAuthorizationFault(Message request)
Creates an "Authorization"
FaultMessage for the given request Message. |
EndpointReference |
createDynamicEndpointReference() |
FaultMessage |
createEndpointUnavailableFault(Message request)
Creates an "EndpointUnavailable"
FaultMessage for the given request Message. |
EventingException |
createEventingException(int type,
java.lang.String reason)
Exceptions
|
FaultMessage |
createGenericFault(Message request,
java.lang.String reason) |
FaultMessage |
createGenericFault(Message request,
java.lang.String reason,
AttributedURI relatesTo) |
FaultMessage |
createInvalidAddressingHeaderFault(Message request,
LocalizedString reason,
ProtocolInfo protocolInfo)
Creates an "InvalidAddressingHeader"
FaultMessage for the given request Message, LocalizedString and ProtocolInfo . |
InvocationException |
createInvocationException(Fault fault,
boolean sender,
QName subcode,
DataStructure reason,
ParameterValue params)
|
InvocationException |
createInvocationExceptionSOAPFault(boolean sender,
QName subcode,
DataStructure reason,
ParameterValue params)
|
FaultMessage |
createInvocationFault(InvocationException inEx,
InvokeMessage invokeRequest,
ProtocolInfo protocolInfo)
Creates an "Invocation"
FaultMessage for the given InvocationException , InvokeMessage and ProtocolInfo. |
FaultMessage |
createMessageAddressingHeaderRequiredFault()
Creates an "MessageAddressingHeaderRequirede"
FaultMessage. |
ProtocolInfo |
createProtocolInfo()
Returns the an instance of
ProtocolInfo for this CommunicationManager. |
ProtocolInfo |
createProtocolInfo(ProtocolVersion version)
Creates an instance of
ProtocolInfo according to the given version information. |
SOAPException |
createSubscriptionFault(int faultType,
Message msg,
LocalizedString reason,
ProtocolInfo protocolInfo,
boolean sender)
Creates an "SubscriptionFault"
SOAPException for the given faultType, Message,
LocalizedString, ProtocolInfo and sender. |
AddressFilter |
getAddressFilter()
Address filter
|
Iterator |
getAllAvailableDiscoveryDomains()
Returns an iterator over all available discovery domains from the underlying communication
layer.
|
int |
getAllAvailableDiscoveryDomainsSize()
Returns the size of all available discovery domains from the underlying communication layer.
|
AutoBindingFactory |
getAutoBindingFactory()
Returns the AutoBindingFactory for the specified communicationManager to generate autobindings.
|
DataStructure |
getAvailableOutgoingDiscoveryInfos(boolean includeXAddressInHello,
CredentialInfo localCredentialInfo)
Returns all available
OutgoingDiscoveryInfos for the given combination of
includeXAddressInHello and localCredentialInfo. |
Iterator |
getChildren(DeviceReference devRef,
boolean doDiscovery)
Returns the embedded device references, if any exist.
|
CommunicationBinding |
getCommunicationBinding(DiscoveryBinding binding,
java.lang.String path)
Creates and returns the
CommunicationBinding for the given DiscoveryBinding and
path. |
java.lang.String |
getCommunicationManagerId()
Returns the unique identifier of this communication manager's technology (e.g.
|
QName |
getDeviceType(ProtocolVersion version) |
QNameSet |
getDeviceTypes(LocalDevice device) |
DiscoveryBinding |
getDiscoveryBinding(ConnectionInfo connectionInfo)
Returns a
DiscoveryBinding for the given ConnectionInfo |
DiscoveryBinding |
getDiscoveryBinding(OutgoingDiscoveryInfo outgoingDiscoveryInfo)
Returns a
DiscoveryBinding for the given OutgoingDiscoveryInfo. |
DataStructure |
getDiscoveryBindings(CommunicationBinding binding)
Returns all
DiscoveryBindings for the given CommunicationBinding. |
static DPWSConstantsHelper |
getHelper(ConnectionInfo connectionInfo) |
static DPWSConstantsHelper |
getHelper(ProtocolVersion dpwsVersion) |
static HashSet |
getMessageIDsForGetMetadataMapping() |
MetadataValidator |
getMetadataValidator() |
java.lang.Object[] |
getMulticastAddressAndPortForDiscoveryBinding(DiscoveryDomain discoveryDomain)
Returns the multicast-address at position 0 and the multicast-port (as Integer) at positon 1.
|
java.lang.Object[] |
getMulticastAddressAndPortForOutgoingDiscoveryInfo(DiscoveryDomain discoveryDomain)
Returns the multicast-address at position 0 and the multicast-port (as Integer) at positon 1.
|
OutgoingDiscoveryInfo |
getOutgoingDiscoveryInfo(ConnectionInfo connectionInfo)
Returns a
OutgoingDiscoveryInfo for given ConnectionInfo. |
OutgoingDiscoveryInfo |
getOutgoingDiscoveryInfo(DiscoveryBinding discoveryBinding,
boolean includeXAddressInHello,
CredentialInfo localCredentialInfo)
Returns all generated
OutgoingDiscoveryInfos for the given combination of DiscoveryBinding, includeXAddressInHello and CredentialInfo. |
DataStructure |
getOutgoingDiscoveryInfos(CommunicationBinding binding,
boolean includeXAddressInHello,
CredentialInfo localCredentialInfo)
Returns all generated
OutgoingDiscoveryInfos for the given combination of CommunicationBinding, includeXAddressInHello and CredentialInfo. |
long |
getRandomApplicationDelay(ProtocolVersion dpwsVersion)
Returns the random application delay for given
ProtocolVersion. |
static Set |
getRegisterForGetMetadata() |
ResourceLoader |
getResourceAsStream(URI location,
CredentialInfo credentialInfo)
Returns an input stream which allows to read a resource from the given location.
|
protected SOAPoverUDPServer |
getSOAPoverUDPServer(IPDiscoveryBinding binding,
boolean create) |
HashSet |
getSupportedVersions()
Returns a set of supported versions by this
CommunicationManager. |
void |
init()
This method will be invoked by the framework during the start up phase.
|
static boolean |
isMessageComplyingWithSecurityRequirements(SignableMessage message,
ConnectionInfo connectionInfo,
java.lang.String defaultKeyId) |
boolean |
isTransportAddress(URI uri)
Returns
true if the uri represents a HTTP, HTTPS or SOAP-over-UDP transport address. |
void |
kill()
Important: This method may only be called from the
CommunicationManagerRegistry! Stops
this communication manager immediately, closes all connections and frees any
used resources without waiting for. |
DescriptionParser |
newDescriptionParser() |
DescriptionSerializer |
newDescriptionSerializer() |
void |
registerDevice(CommunicationBinding binding,
IncomingMessageListener listener,
LocalDevice device)
Registers a device to receive (TCP) messages on a specified socket.
|
void |
registerDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
Registers the framework to receive (UDP) discovery messages on a specified socket.
|
URI |
registerResource(Resource resource,
CommunicationBinding binding,
java.lang.String resourcePath,
AuthorizationManager authMan)
Deploys the given resource so that it can be accessed over the technology that this
communication manager instance represents.
|
void |
registerService(int[] messageTypes,
CommunicationBinding binding,
IncomingMessageListener listener,
LocalService service)
Registers a service to receive (TCP) messages on a specified socket.
|
void |
send(Message message,
ProtocolInfo protocolInfo,
DataStructure discoveryInfos,
ResponseCallback callback)
Sends the
message as a asynchronous request through the specified
discoveryInfos; any responses (if present) including faults and timeouts will be
delivered to the given callback. |
void |
send(Message message,
XAddressInfo targetXAddrInfo,
CredentialInfo credentialInfo)
Sends message to an explicit endpoint and is not waiting for response.
|
void |
send(Message message,
XAddressInfo targetXAddrInfo,
CredentialInfo credentialInfo,
ResponseCallback callback)
Sends message as synchronous request / response.
|
long |
serializeMessageWithAttachments(Message message,
byte[] mimeBoundary,
List attachments,
java.io.ByteArrayOutputStream[] buffer,
ConnectionInfo ci,
AttributedURI optionalMessageId) |
void |
serializeMessageWithAttachments(Message message,
byte[] mimeBoundary,
List attachments,
java.io.OutputStream out,
ConnectionInfo ci,
AttributedURI optionalMessageId) |
void |
setAddressFilter(AddressFilter filter)
TODO will be removed in future
|
void |
start()
Important: This method may only be called from the
CommunicationManagerRegistry! Starts
this communication manager instance. |
void |
stop()
Important: This method may only be called from the
CommunicationManagerRegistry! Stops
this communication manager as soon as possible, closes all connections and frees any used
resources. |
boolean |
supportsAddressingNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci)
Checks if the given namespace would be supported.
|
boolean |
supportsDiscoveryNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci) |
boolean |
supportsEventingFilterDialect(URI dialect,
ProtocolInfo protocolInfo)
UTIL
|
boolean |
supportsEventingNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci) |
void |
unregisterDevice(CommunicationBinding binding,
LocalDevice device)
Unregisters a device to stop receiving (TCP) messages on a specified socket.
|
boolean |
unregisterDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
Unregisters the framework to stop receiving (UDP) discovery messages on a specified socket.
|
void |
unregisterResource(URI deployAddress,
CommunicationBinding binding)
Removes the previously
deployed resource at the given deployAddress from this
communication manager. |
void |
unregisterService(int[] messageTypes,
CommunicationBinding binding,
LocalService service)
Unregisters a service to stop receiving (TCP) messages on a specified socket.
|
int |
validateMessage(SignableMessage message,
ConnectionInfo connectionInfo,
CredentialInfo credentialInfo,
java.lang.String defaultKeyId)
|
public static final java.lang.String COMMUNICATION_MANAGER_ID
public DPWSCommunicationManager()
Class.forName(...) ).public static HashSet getMessageIDsForGetMetadataMapping()
public static DPWSConstantsHelper getHelper(ConnectionInfo connectionInfo)
public static DPWSConstantsHelper getHelper(ProtocolVersion dpwsVersion)
public static boolean isMessageComplyingWithSecurityRequirements(SignableMessage message, ConnectionInfo connectionInfo, java.lang.String defaultKeyId)
public static Set getRegisterForGetMetadata()
public void init()
CommunicationManagerinit in interface CommunicationManagerpublic java.lang.String getCommunicationManagerId()
CommunicationManagergetCommunicationManagerId in interface CommunicationManagerpublic void start()
throws java.io.IOException
CommunicationManagerInternalCommunicationManagerRegistry! Starts
this communication manager instance. This method executes any needed initialization steps so
that further calls to other methods such as #registerDevice(CommunicationBinding,
IncomingMessageListener) , CommunicationManager.send(Message, ProtocolInfo, DataStructure,
ResponseCallback), etc. can operate correctly.
If this communication manager has already been started, this method must not do anything else other than quickly return.
start in interface CommunicationManagerInternaljava.io.IOException - in case initializing communication failed for some reason; the caller should assume that this
communication manager instance is not usablepublic void kill()
CommunicationManagerInternalCommunicationManagerRegistry! Stops
this communication manager immediately, closes all connections and frees any
used resources without waiting for. Any further interactions with this instance like #registerDevice(CommunicationBinding, IncomingMessageListener) registering listeners or CommunicationManager.send(Message, ProtocolInfo, DataStructure, ResponseCallback) sending messages will result in
WS4DIllegalStateException illegal state exceptions.
WARNING! This method causes the communication manager to loose all of its
current state! That is, reactivating the communication manager again after this method has been
called will result in having no #registerDevice(CommunicationBinding,
IncomingMessageListener), CommunicationManager.registerService(int[], CommunicationBinding,
IncomingMessageListener, LocalService) or #registerDiscovery(int[], DiscoveryBinding,
IncomingMessageListener) registrations for incoming messages.
If this communication manager has already been stopped, this method must not do anything else other than quickly return
kill in interface CommunicationManagerInternalpublic void stop()
CommunicationManagerInternalCommunicationManagerRegistry! Stops
this communication manager as soon as possible, closes all connections and frees any used
resources. Any further interactions with this instance like #registerDevice(CommunicationBinding, IncomingMessageListener) registering listeners or CommunicationManager.send(Message, ProtocolInfo, DataStructure, ResponseCallback) sending messages will result in
WS4DIllegalStateException illegal state exceptions.
If it is necessary to stop the communication manager immediately the CommunicationManagerInternal.kill() method
should be used.
WARNING! This method causes the communication manager to loose all of its
current state! That is, reactivating the communication manager again after this method has been
called will result in having no #registerDevice(CommunicationBinding,
IncomingMessageListener), CommunicationManager.registerService(int[], CommunicationBinding,
IncomingMessageListener, LocalService) or #registerDiscovery(int[], DiscoveryBinding,
IncomingMessageListener) registrations for incoming messages.
If this communication manager has already been stopped, this method must not do anything else other than quickly return.
stop in interface CommunicationManagerInternalpublic AutoBindingFactory getAutoBindingFactory()
CommunicationManagergetAutoBindingFactory in interface CommunicationManagerpublic Iterator getAllAvailableDiscoveryDomains()
CommunicationManagergetAllAvailableDiscoveryDomains in interface CommunicationManagerpublic int getAllAvailableDiscoveryDomainsSize()
CommunicationManagergetAllAvailableDiscoveryDomainsSize in interface CommunicationManagerpublic DataStructure getAvailableOutgoingDiscoveryInfos(boolean includeXAddressInHello, CredentialInfo localCredentialInfo)
CommunicationManagerOutgoingDiscoveryInfos for the given combination of
includeXAddressInHello and localCredentialInfo.getAvailableOutgoingDiscoveryInfos in interface CommunicationManagerOutgoingDiscoveryInfos.public java.lang.Object[] getMulticastAddressAndPortForOutgoingDiscoveryInfo(DiscoveryDomain discoveryDomain)
CommunicationManagergetMulticastAddressAndPortForOutgoingDiscoveryInfo in interface CommunicationManagerpublic java.lang.Object[] getMulticastAddressAndPortForDiscoveryBinding(DiscoveryDomain discoveryDomain)
CommunicationManagergetMulticastAddressAndPortForDiscoveryBinding in interface CommunicationManagerpublic DiscoveryBinding getDiscoveryBinding(ConnectionInfo connectionInfo)
CommunicationManagerDiscoveryBinding for the given ConnectionInfogetDiscoveryBinding in interface CommunicationManagerpublic DiscoveryBinding getDiscoveryBinding(OutgoingDiscoveryInfo outgoingDiscoveryInfo) throws java.io.IOException
CommunicationManagerDiscoveryBinding for the given OutgoingDiscoveryInfo.getDiscoveryBinding in interface CommunicationManagerOutgoingDiscoveryInfojava.io.IOExceptionpublic DataStructure getDiscoveryBindings(CommunicationBinding binding)
CommunicationManagerDiscoveryBindings for the given CommunicationBinding.getDiscoveryBindings in interface CommunicationManagerDiscoveryBinding.public CommunicationBinding getCommunicationBinding(DiscoveryBinding binding, java.lang.String path)
CommunicationManagerCommunicationBinding for the given DiscoveryBinding and
path.getCommunicationBinding in interface CommunicationManagerpublic DataStructure getOutgoingDiscoveryInfos(CommunicationBinding binding, boolean includeXAddressInHello, CredentialInfo localCredentialInfo)
CommunicationManagerOutgoingDiscoveryInfos for the given combination of CommunicationBinding, includeXAddressInHello and CredentialInfo.getOutgoingDiscoveryInfos in interface CommunicationManagerOutgoingDiscoveryInfopublic OutgoingDiscoveryInfo getOutgoingDiscoveryInfo(DiscoveryBinding discoveryBinding, boolean includeXAddressInHello, CredentialInfo localCredentialInfo)
CommunicationManagerOutgoingDiscoveryInfos for the given combination of DiscoveryBinding, includeXAddressInHello and CredentialInfo.getOutgoingDiscoveryInfo in interface CommunicationManagerOutgoingDiscoveryInfopublic OutgoingDiscoveryInfo getOutgoingDiscoveryInfo(ConnectionInfo connectionInfo)
CommunicationManagerOutgoingDiscoveryInfo for given ConnectionInfo.getOutgoingDiscoveryInfo in interface CommunicationManagerpublic long getRandomApplicationDelay(ProtocolVersion dpwsVersion)
CommunicationManagerProtocolVersion.getRandomApplicationDelay in interface CommunicationManagerpublic void registerDevice(CommunicationBinding binding, IncomingMessageListener listener, LocalDevice device) throws java.io.IOException, WS4DIllegalStateException
registerDevice in interface CommunicationManagerbinding - HttpBinding.listener - java.io.IOException - If the binding type does not match.WS4DIllegalStateExceptionpublic void registerService(int[] messageTypes,
CommunicationBinding binding,
IncomingMessageListener listener,
LocalService service)
throws java.io.IOException,
WS4DIllegalStateException
registerService in interface CommunicationManagermessageTypes - Messages to receive. See for example MessageConstants.binding - HttpBinding.listener - service - TODOjava.io.IOException - If the binding type does not match.WS4DIllegalStateExceptionpublic void registerDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
throws java.io.IOException,
WS4DIllegalStateException
registerDiscovery in interface CommunicationManagermessageTypes - Messages to receive. See for example MessageConstants.binding - DiscoveryBinding.listener - device - the device or null.java.io.IOException - If the binding type does not matWS4DIllegalStateExceptionpublic void unregisterDevice(CommunicationBinding binding, LocalDevice device) throws java.io.IOException, WS4DIllegalStateException
unregisterDevice in interface CommunicationManagerbinding - HttpBinding.java.io.IOException - If the binding type does not match.WS4DIllegalStateExceptionpublic void unregisterService(int[] messageTypes,
CommunicationBinding binding,
LocalService service)
throws java.io.IOException,
WS4DIllegalStateException
unregisterService in interface CommunicationManagermessageTypes - Messages to receive. See for example MessageConstants.binding - HttpBinding.java.io.IOException - If the binding type does not match.WS4DIllegalStateExceptionpublic boolean unregisterDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
throws java.io.IOException,
WS4DIllegalStateException
unregisterDiscovery in interface CommunicationManagermessageTypes - Messages to receive. See for example MessageConstants.binding - DiscoveryBinding.listener - the callback which was previously registereddevice - the device or null.java.io.IOException - If the binding type does not matWS4DIllegalStateExceptionpublic URI registerResource(Resource resource, CommunicationBinding binding, java.lang.String resourcePath, AuthorizationManager authMan) throws java.io.IOException, WS4DIllegalStateException
CommunicationManagerbinding and additional resource-specific
addressing information found in resourcePath. Returns an URI depicting the
actual address the resource is bound to.registerResource in interface CommunicationManagerresource - the resource to deploybinding - a binding over which to make the resource availableresourcePath - additional addressing-related information for use when binding the resourcejava.io.IOException - in case binding the resource failed for some reason, e.g. an address being already in use, etc.WS4DIllegalStateException - if this communication manager has already been stoppedpublic void unregisterResource(URI deployAddress, CommunicationBinding binding) throws java.io.IOException, WS4DIllegalStateException
CommunicationManagerdeployed resource at the given deployAddress from this
communication manager.unregisterResource in interface CommunicationManagerdeployAddress - the addressing at which the resource previously was CommunicationManager.registerResource(Resource,
CommunicationBinding, String, AuthorizationManager)java.io.IOException - in case removing the resource failed for some reason, e.g. the resource was not previously deployed,
etc.WS4DIllegalStateException - if this communication manager has already been stoppedpublic ResourceLoader getResourceAsStream(URI location, CredentialInfo credentialInfo) throws java.io.IOException
CommunicationManagergetResourceAsStream in interface CommunicationManagerlocation - the location of the resource (e.g. http://example.org/test.wsdl).java.io.IOExceptionprotected SOAPoverUDPServer getSOAPoverUDPServer(IPDiscoveryBinding binding, boolean create)
public void send(Message message, ProtocolInfo protocolInfo, DataStructure discoveryInfos, ResponseCallback callback) throws WS4DIllegalStateException
CommunicationManagermessage as a asynchronous request through the specified
discoveryInfos; any responses (if present) including faults and timeouts will be
delivered to the given callback.
The argument discoveryInfos has a certain meaning only when sending
multicast/broadcast messages; this currently applies to HelloMessages, ByeMessages, ProbeMessages and ResolveMessages. In this case, it specifies the
concrete transport technology and optionally, some technology- or protocol-specific interfaces
(aka. "discoveryInfos") over which to send the multicast message. In the case of
DPWS, where multicast messages are sent by means of SOAP-over-UDP, the value of this argument
could depict a certain network interface (e.g. eth0, pcn0, etc.) or a
specific local IP address. This should then be used to send the multicast message. For further
information regarding the outgoing interface of multicast messages when using IP multicast, see
RFC 1112.
In the concrete case when message is one of HelloMessage, ByeMessage or SubscriptionEndMessage, the value of callback is ignored.
In any other case it is expected to have a non-null value.
send in interface CommunicationManagermessage - the request message to sendprotocolInfo - information about protocol detailsdiscoveryInfos - the outgoing discovery info (the protocol domain over which to send the message)callback - where to deliver responses to the messageWS4DIllegalStateException - if this communication manager has already been stoppedpublic void send(Message message, XAddressInfo targetXAddrInfo, CredentialInfo credentialInfo) throws WS4DIllegalStateException
CommunicationManagerCredentialInfo is needed.send in interface CommunicationManagermessage - message message the request message to sendtargetXAddrInfo - target address for the communicationcredentialInfo - security information for secure communicationWS4DIllegalStateExceptionpublic void send(Message message, XAddressInfo targetXAddrInfo, CredentialInfo credentialInfo, ResponseCallback callback) throws WS4DIllegalStateException
CommunicationManagerCredentialInfo is needed. For this communication a callback for the response is needed.send in interface CommunicationManagermessage - message the request message to sendtargetXAddrInfo - target address for the communicationcredentialInfo - security information for secure communicationcallback - callback where to deliver responses to the messageWS4DIllegalStateExceptionprotected void checkAndSendTCPMessage(Message message, ResponseCallback callback, XAddressInfo targetXAddrInfo, CredentialInfo credentialInfo)
public void serializeMessageWithAttachments(Message message, byte[] mimeBoundary, List attachments, java.io.OutputStream out, ConnectionInfo ci, AttributedURI optionalMessageId) throws java.io.IOException
java.io.IOExceptionpublic long serializeMessageWithAttachments(Message message, byte[] mimeBoundary, List attachments, java.io.ByteArrayOutputStream[] buffer, ConnectionInfo ci, AttributedURI optionalMessageId) throws java.io.IOException
java.io.IOExceptionpublic ProtocolInfo createProtocolInfo()
CommunicationManagerProtocolInfo for this CommunicationManager.createProtocolInfo in interface CommunicationManagerpublic ProtocolInfo createProtocolInfo(ProtocolVersion version)
CommunicationManagerProtocolInfo according to the given version information.createProtocolInfo in interface CommunicationManagerversion - the version the protocol info should be created for.public HashSet getSupportedVersions()
CommunicationManagerCommunicationManager.
This should be a set containing ProtocolVersion objects with the version number.
getSupportedVersions in interface CommunicationManagerpublic boolean supportsAddressingNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci)
throws VersionMismatchException
CommunicationManagersupportsAddressingNamespace in interface CommunicationManagerVersionMismatchExceptionpublic boolean supportsDiscoveryNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci)
throws VersionMismatchException
VersionMismatchExceptionpublic boolean supportsEventingNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci)
throws VersionMismatchException
VersionMismatchExceptionpublic QNameSet getDeviceTypes(LocalDevice device)
getDeviceTypes in interface CommunicationManagerpublic QName getDeviceType(ProtocolVersion version)
getDeviceType in interface CommunicationManagerversion - public FaultMessage createActionNotSupportedFault(Message request, java.lang.String actionString, ProtocolInfo protocolInfo)
createActionNotSupportedFault in interface CommunicationManagerpublic FaultMessage createEndpointUnavailableFault(Message request)
CommunicationManagerFaultMessage for the given request Message.createEndpointUnavailableFault in interface CommunicationManagerpublic FaultMessage createGenericFault(Message request, java.lang.String reason)
public FaultMessage createGenericFault(Message request, java.lang.String reason, AttributedURI relatesTo)
public FaultMessage createMessageAddressingHeaderRequiredFault()
CommunicationManagerFaultMessage.createMessageAddressingHeaderRequiredFault in interface CommunicationManagerpublic FaultMessage createAuthorizationFault(Message request)
CommunicationManagerFaultMessage for the given request Message.createAuthorizationFault in interface CommunicationManagerpublic FaultMessage createInvocationFault(InvocationException inEx, InvokeMessage invokeRequest, ProtocolInfo protocolInfo)
CommunicationManagerFaultMessage for the given InvocationException , InvokeMessage and ProtocolInfo.createInvocationFault in interface CommunicationManagerpublic FaultMessage createInvalidAddressingHeaderFault(Message request, LocalizedString reason, ProtocolInfo protocolInfo)
CommunicationManagerFaultMessage for the given request Message, LocalizedString and ProtocolInfo .createInvalidAddressingHeaderFault in interface CommunicationManagerpublic SOAPException createSubscriptionFault(int faultType, Message msg, LocalizedString reason, ProtocolInfo protocolInfo, boolean sender)
CommunicationManagerSOAPException for the given faultType, Message,
LocalizedString, ProtocolInfo and sender.createSubscriptionFault in interface CommunicationManagerpublic EventingException createEventingException(int type, java.lang.String reason)
createEventingException in interface CommunicationManagerpublic InvocationException createInvocationException(Fault fault, boolean sender, QName subcode, DataStructure reason, ParameterValue params)
CommunicationManagercreateInvocationException in interface CommunicationManagerpublic InvocationException createInvocationExceptionSOAPFault(boolean sender, QName subcode, DataStructure reason, ParameterValue params)
CommunicationManagercreateInvocationExceptionSOAPFault in interface CommunicationManagerpublic boolean supportsEventingFilterDialect(URI dialect, ProtocolInfo protocolInfo)
supportsEventingFilterDialect in interface CommunicationManagerpublic boolean isTransportAddress(URI uri)
true if the uri represents a HTTP, HTTPS or SOAP-over-UDP transport address.isTransportAddress in interface CommunicationManagertrue if the uri represents a HTTP, HTTPS or SOAP-over-UDP transport address.public int validateMessage(SignableMessage message, ConnectionInfo connectionInfo, CredentialInfo credentialInfo, java.lang.String defaultKeyId)
CommunicationManagervalidateMessage in interface CommunicationManagerpublic AddressFilter getAddressFilter()
CommunicationManagergetAddressFilter in interface CommunicationManagerpublic void setAddressFilter(AddressFilter filter)
CommunicationManagersetAddressFilter in interface CommunicationManagerpublic java.lang.String checkIfAddressIsAnyLocalThenInterface(java.lang.String addr,
ConnectionInfo connectionInfo)
checkIfAddressIsAnyLocalThenInterface in interface CommunicationManagerpublic DescriptionParser newDescriptionParser()
newDescriptionParser in interface CommunicationManagerpublic DescriptionSerializer newDescriptionSerializer()
newDescriptionSerializer in interface CommunicationManagerpublic boolean containsAllDeviceTypes(QNameSet searchTypes, QNameSet types)
containsAllDeviceTypes in interface CommunicationManagerpublic boolean containsAllServiceTypes(QNameSet searchTypes, QNameSet types)
containsAllServiceTypes in interface CommunicationManagerpublic boolean containsAllSearchScopes(ScopeSet searchScopes, ScopeSet deviceScopes)
containsAllSearchScopes in interface CommunicationManagerpublic QNameSet adaptServiceTypes(QNameSet qnames)
CommunicationManageradaptServiceTypes in interface CommunicationManagerpublic QNameSet adaptDeviceTypes(QNameSet qnames)
CommunicationManageradaptDeviceTypes in interface CommunicationManagerpublic EndpointReference createDynamicEndpointReference()
createDynamicEndpointReference in interface CommunicationManagerpublic MetadataValidator getMetadataValidator()
getMetadataValidator in interface CommunicationManagerpublic Iterator getChildren(DeviceReference devRef, boolean doDiscovery) throws CommunicationException
CommunicationManagergetChildren in interface CommunicationManagerdevRef - the device reference for which the children should be fetcheddoDiscovery - should be true if additional network communication is acceptable. This method will block until the
information has been obtained.CommunicationException - Can only be thrown when doDiscovery is set to true