public interface CommunicationManager
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID_NULL |
| 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.
|
java.lang.String |
checkIfAddressIsAnyLocalThenInterface(java.lang.String from,
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)
|
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)
Creates an
EventingException for the given type and reason. |
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 parameterValue)
|
InvocationException |
createInvocationExceptionSOAPFault(boolean sender,
QName subcode,
DataStructure reason,
ParameterValue parameterValue)
|
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 pinfo) |
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. |
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 version)
Returns the random application delay for given
ProtocolVersion. |
ResourceLoader |
getResourceAsStream(URI location,
CredentialInfo credentialInfo)
Returns an input stream which allows to read a resource from the given location.
|
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.
|
boolean |
isTransportAddress(URI uri)
Returns
true if the uri represents a transport address. |
DescriptionParser |
newDescriptionParser() |
DescriptionSerializer |
newDescriptionSerializer() |
void |
registerDevice(CommunicationBinding binding,
IncomingMessageListener listener,
LocalDevice device)
Registers the
messageListener for receiving incoming messages. |
void |
registerDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
Registers the
messageListener for receiving incoming messages of the specified
messageTypes at the given binding address. |
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 the
messageListener for receiving incoming messages of the specified
messageTypes at the given binding address. |
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 targetXAdrInfo,
CredentialInfo credentialInfo,
ResponseCallback callback)
Sends message as synchronous request / response.
|
void |
setAddressFilter(AddressFilter filter)
TODO will be removed in future
|
boolean |
supportsAddressingNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci)
Checks if the given namespace would be supported.
|
boolean |
supportsEventingFilterDialect(URI dialect,
ProtocolInfo protocolInfo)
Checks if the dialect shall supported.
|
void |
unregisterDevice(CommunicationBinding binding,
LocalDevice device)
Destroys a previously made
registration for the given binding. |
boolean |
unregisterDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
Destroys a previously made
#registerDiscovery(int[], DiscoveryBinding,
IncomingMessageListener) registration for the given messageTypes, binding
and listener. |
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)
Destroys a previously made
registerService(int[], CommunicationBinding,
IncomingMessageListener, LocalService) registration for the given messageTypes
and binding. |
int |
validateMessage(SignableMessage message,
ConnectionInfo connectionInfo,
CredentialInfo credentialInfo,
java.lang.String defaultKeyId)
|
void init()
java.lang.String getCommunicationManagerId()
void registerDevice(CommunicationBinding binding, IncomingMessageListener listener, LocalDevice device) throws java.io.IOException, WS4DIllegalStateException
messageListener for receiving incoming messages.binding - the binding to register tolistener - the callback to deliver incoming desired messages tojava.io.IOException - in case registration failed for some reason, e.g. an address being already in use, etc.WS4DIllegalStateException - if this communication manager has already been stoppedvoid registerService(int[] messageTypes,
CommunicationBinding binding,
IncomingMessageListener listener,
LocalService service)
throws java.io.IOException,
WS4DIllegalStateException
messageListener for receiving incoming messages of the specified
messageTypes at the given binding address. See MessageConstants for a list of supported message types.messageTypes - determines which message types to register tobinding - the binding to register tolistener - the callback to deliver incoming desired messages toservice - TODOjava.io.IOException - in case registration failed for some reason, e.g. an address being already in use, etc.WS4DIllegalStateException - if this communication manager has already been stoppedvoid registerDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
throws java.io.IOException,
WS4DIllegalStateException
messageListener for receiving incoming messages of the specified
messageTypes at the given binding address. See MessageConstants for a list of supported message types.messageTypes - determines which message types to register tobinding - the binding to register tolistener - the callback to deliver incoming desired messages to * @paramdevice - the device or null.java.io.IOException - in case registration failed for some reason, e.g. an address being already in use, etc.WS4DIllegalStateException - if this communication manager has already been stoppedvoid unregisterDevice(CommunicationBinding binding, LocalDevice device) throws java.io.IOException, WS4DIllegalStateException
registration for the given binding.binding - the binding to removejava.io.IOException - in case removing the registration failed for some reason, e.g. this binding was not already registered,
etc.WS4DIllegalStateException - if this communication manager has already been stoppedvoid unregisterService(int[] messageTypes,
CommunicationBinding binding,
LocalService service)
throws java.io.IOException,
WS4DIllegalStateException
registerService(int[], CommunicationBinding,
IncomingMessageListener, LocalService) registration for the given messageTypes
and binding.messageTypes - determines which message types to remove registration frombinding - the binding to removejava.io.IOException - in case removing the registration failed for some reason, e.g. this binding was not already registered,
etc.WS4DIllegalStateException - if this communication manager has already been stoppedboolean unregisterDiscovery(int[] messageTypes,
DiscoveryBinding binding,
IncomingMessageListener listener,
LocalDevice device)
throws java.io.IOException,
WS4DIllegalStateException
#registerDiscovery(int[], DiscoveryBinding,
IncomingMessageListener) registration for the given messageTypes, binding
and listener.messageTypes - determines which message types to remove registration frombinding - the binding to removelistener - the callback which was previously registereddevice - the device or null.java.io.IOException - in case removing the registration failed for some reason, e.g. this binding was not already registered,
etc.WS4DIllegalStateException - if this communication manager has already been stoppedvoid send(Message message, ProtocolInfo protocolInfo, DataStructure discoveryInfos, ResponseCallback callback) throws WS4DIllegalStateException
message 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.
message - 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 stoppedvoid send(Message message, XAddressInfo targetXAdrInfo, CredentialInfo credentialInfo, ResponseCallback callback) throws WS4DIllegalStateException
CredentialInfo is needed. For this communication a callback for the response is needed.message - message the request message to sendtargetXAdrInfo - target address for the communicationcredentialInfo - security information for secure communicationcallback - callback where to deliver responses to the messageWS4DIllegalStateExceptionvoid send(Message message, XAddressInfo targetXAddrInfo, CredentialInfo credentialInfo) throws WS4DIllegalStateException
CredentialInfo is needed.message - message message the request message to sendtargetXAddrInfo - target address for the communicationcredentialInfo - security information for secure communicationWS4DIllegalStateExceptionURI registerResource(Resource resource, CommunicationBinding binding, java.lang.String resourcePath, AuthorizationManager authMan) throws java.io.IOException, WS4DIllegalStateException
binding and additional resource-specific
addressing information found in resourcePath. Returns an URI depicting the
actual address the resource is bound to.resource - 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 stoppedvoid unregisterResource(URI deployAddress, CommunicationBinding binding) throws java.io.IOException, WS4DIllegalStateException
deployed resource at the given deployAddress from this
communication manager.deployAddress - the addressing at which the resource previously was registerResource(Resource,
CommunicationBinding, String, AuthorizationManager)binding - 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 stoppedResourceLoader getResourceAsStream(URI location, CredentialInfo credentialInfo) throws java.io.IOException
location - the location of the resource (e.g. http://example.org/test.wsdl).java.io.IOExceptionboolean isTransportAddress(URI uri)
true if the uri represents a transport address.true if the uri represents a transport address.AutoBindingFactory getAutoBindingFactory()
Iterator getAllAvailableDiscoveryDomains()
int getAllAvailableDiscoveryDomainsSize()
DataStructure getAvailableOutgoingDiscoveryInfos(boolean includeXAddressInHello, CredentialInfo localCredentialInfo)
OutgoingDiscoveryInfos for the given combination of
includeXAddressInHello and localCredentialInfo.includeXAddressInHello - localCredentialInfo - OutgoingDiscoveryInfos.DiscoveryBinding getDiscoveryBinding(OutgoingDiscoveryInfo outgoingDiscoveryInfo) throws java.io.IOException
DiscoveryBinding for the given OutgoingDiscoveryInfo.outgoingDiscoveryInfo - OutgoingDiscoveryInfojava.io.IOExceptionDataStructure getDiscoveryBindings(CommunicationBinding binding)
DiscoveryBindings for the given CommunicationBinding.binding - DiscoveryBinding.CommunicationBinding getCommunicationBinding(DiscoveryBinding binding, java.lang.String path)
CommunicationBinding for the given DiscoveryBinding and
path.binding - path - OutgoingDiscoveryInfo getOutgoingDiscoveryInfo(ConnectionInfo connectionInfo)
OutgoingDiscoveryInfo for given ConnectionInfo.connectionInfo - DataStructure getOutgoingDiscoveryInfos(CommunicationBinding binding, boolean includeXAddressInHello, CredentialInfo localCredentialInfo)
OutgoingDiscoveryInfos for the given combination of CommunicationBinding, includeXAddressInHello and CredentialInfo.binding - includeXAddressInHello - localCredentialInfo - OutgoingDiscoveryInfoOutgoingDiscoveryInfo getOutgoingDiscoveryInfo(DiscoveryBinding discoveryBinding, boolean includeXAddressInHello, CredentialInfo localCredentialInfo)
OutgoingDiscoveryInfos for the given combination of DiscoveryBinding, includeXAddressInHello and CredentialInfo.discoveryBinding - includeXAddressInHello - localCredentialInfo - OutgoingDiscoveryInfojava.lang.Object[] getMulticastAddressAndPortForOutgoingDiscoveryInfo(DiscoveryDomain discoveryDomain)
java.lang.Object[] getMulticastAddressAndPortForDiscoveryBinding(DiscoveryDomain discoveryDomain)
DiscoveryBinding getDiscoveryBinding(ConnectionInfo connectionInfo)
DiscoveryBinding for the given ConnectionInfoconnectionInfo - ProtocolInfo createProtocolInfo()
ProtocolInfo for this CommunicationManager.ProtocolInfo createProtocolInfo(ProtocolVersion version)
ProtocolInfo according to the given version information.version - the version the protocol info should be created for.HashSet getSupportedVersions()
CommunicationManager.
This should be a set containing ProtocolVersion objects with the version number.
long getRandomApplicationDelay(ProtocolVersion version)
ProtocolVersion.version - boolean supportsAddressingNamespace(java.lang.String namespace,
java.lang.String name,
ConnectionInfo ci)
throws VersionMismatchException
namespace - name - ci - VersionMismatchExceptionQNameSet getDeviceTypes(LocalDevice device)
QName getDeviceType(ProtocolVersion pinfo)
FaultMessage createActionNotSupportedFault(Message request, java.lang.String actionString, ProtocolInfo protocolInfo)
request - protocolInfo - FaultMessage createEndpointUnavailableFault(Message request)
FaultMessage for the given request Message.request - FaultMessage createMessageAddressingHeaderRequiredFault()
FaultMessage.FaultMessage createAuthorizationFault(Message request)
FaultMessage for the given request Message.request - FaultMessage createInvocationFault(InvocationException inEx, InvokeMessage invokeRequest, ProtocolInfo protocolInfo)
FaultMessage for the given InvocationException , InvokeMessage and ProtocolInfo.inEx - invokeRequest - protocolInfo - FaultMessage createInvalidAddressingHeaderFault(Message request, LocalizedString reason, ProtocolInfo protocolInfo)
FaultMessage for the given request Message, LocalizedString and ProtocolInfo .request - reason - protocolInfo - SOAPException createSubscriptionFault(int faultType, Message msg, LocalizedString reason, ProtocolInfo protocolInfo, boolean sender)
SOAPException for the given faultType, Message,
LocalizedString, ProtocolInfo and sender.faultType - msg - reason - protocolInfo - sender - EventingException createEventingException(int type, java.lang.String reason)
EventingException for the given type and reason.type - reason - InvocationException createInvocationException(Fault fault, boolean sender, QName subcode, DataStructure reason, ParameterValue parameterValue)
fault - sender - subcode - reason - parameterValue - InvocationException createInvocationExceptionSOAPFault(boolean sender, QName subcode, DataStructure reason, ParameterValue parameterValue)
sender - subcode - reason - parameterValue - boolean supportsEventingFilterDialect(URI dialect, ProtocolInfo protocolInfo)
dialect - protocolInfo - int validateMessage(SignableMessage message, ConnectionInfo connectionInfo, CredentialInfo credentialInfo, java.lang.String defaultKeyId)
message - connectionInfo - credentialInfo - defaultKeyId - AddressFilter getAddressFilter()
void setAddressFilter(AddressFilter filter)
java.lang.String checkIfAddressIsAnyLocalThenInterface(java.lang.String from,
ConnectionInfo connectionInfo)
DescriptionParser newDescriptionParser()
DescriptionSerializer newDescriptionSerializer()
boolean containsAllDeviceTypes(QNameSet searchTypes, QNameSet types)
searchTypes - types - boolean containsAllServiceTypes(QNameSet searchTypes, QNameSet types)
searchTypes - types - boolean containsAllSearchScopes(ScopeSet searchScopes, ScopeSet deviceScopes)
searchScopes - deviceScopes - QNameSet adaptServiceTypes(QNameSet qnames) throws java.lang.IllegalArgumentException
qnames - java.lang.IllegalArgumentExceptionQNameSet adaptDeviceTypes(QNameSet qnames) throws java.lang.IllegalArgumentException
qnames - java.lang.IllegalArgumentExceptionEndpointReference createDynamicEndpointReference()
MetadataValidator getMetadataValidator()
Iterator getChildren(DeviceReference devRef, boolean doDiscovery) throws CommunicationException
devRef - 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