public abstract class ServiceCommons extends java.lang.Object implements Service
| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceCommons.PortType |
| Modifier and Type | Field and Description |
|---|---|
HashMap |
customMData |
protected HashMap |
events |
protected HashMap |
operations |
protected HashMap |
portTypes |
protected HashMap |
wsdls |
NO_PARAMETER| Modifier | Constructor and Description |
|---|---|
protected |
ServiceCommons() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract EventSource |
createEventSource(WSDLOperation wsdlOperation)
Creates a
DefaultEventSource instance suitable for usage within this service instance. |
protected abstract Operation |
createOperation(WSDLOperation wsdlOperation)
Creates an
Operation instance suitable for usage within this service instance. |
boolean |
equals(java.lang.Object obj) |
Iterator |
getAllEventSources()
Returns all
EventSources of this service. |
Iterator |
getAllOperations()
Returns all
Operations from this service. |
UnknownDataContainer[] |
getCustomMData(java.lang.String communicationManagerId)
The method returns all custom metadata
|
Iterator |
getDescriptions()
Returns an iterator over all WSDLs directly attached to this service.
|
protected HashMap |
getEventsInternal() |
EventSource |
getEventSource(QName portType,
java.lang.String eventName,
java.lang.String inputName,
java.lang.String outputName)
Returns the first
EventSource matching the given criteria. |
Iterator |
getEventSources(QName portType,
java.lang.String eventName,
java.lang.String inputName,
java.lang.String outputName)
Returns all
EventSources matching the given criteria. |
protected WSDL |
getExistingDescription(java.lang.String targetNamespace) |
Operation |
getOperation(QName portType,
java.lang.String opName,
java.lang.String inputName,
java.lang.String outputName)
Returns the first
Operation matching the given criteria. |
Iterator |
getOperations(QName portType,
java.lang.String opName,
java.lang.String inputName,
java.lang.String outputName)
Returns all
Operations matching the given criteria. |
CustomAttributeValue |
getPortTypeAttribute(QName portTypeName,
QName attributeName)
Returns the value of the port type attribute with the given
name for the port type
with the specified unique portTypeName or with null if this attribute
is not available (or if its value is explicitly set to null). |
HashMap |
getPortTypeAttributes(QName portTypeName)
Returns all port type attributes explicitly set on this service instance for the port type with
the given unique
portTypeName. |
protected HashMap |
getPortTypesInternal() |
int |
hashCode() |
boolean |
hasPortTypeAttributes(QName portTypeName)
Returns
true only if this service instance has at least one port type attribute
set for the port type with the specified unique portTypeName. |
protected void |
processWSDLPortType(WSDLPortType portType) |
void |
setPortTypeAttribute(QName portTypeName,
QName attributeName,
CustomAttributeValue value)
Sets the
value of the port type attribute with the specified name of
the port type with the given unique portTypeName. |
void |
setPortTypeAttributes(QName portTypeName,
HashMap attributes)
Sets all port type attributes of the port type with unique
portTypeName at once to
those contained within argument attributes. |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdisconnectAllServiceReferences, getDescription, getEprInfos, getParentDeviceReference, getPortTypes, getServiceId, getServiceReference, getStatus, isRemote, renew, subscribe, unsubscribeprotected final HashMap portTypes
protected final HashMap operations
protected final HashMap events
protected final HashMap wsdls
public HashMap customMData
protected HashMap getPortTypesInternal()
protected HashMap getEventsInternal()
public java.lang.String toString()
toString in class java.lang.Objectpublic Operation getOperation(QName portType, java.lang.String opName, java.lang.String inputName, java.lang.String outputName)
ServiceOperation matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignore it (matches all).getOperation in interface Servicepublic Iterator getAllOperations()
ServiceOperations from this service.getAllOperations in interface Servicepublic Iterator getOperations(QName portType, java.lang.String opName, java.lang.String inputName, java.lang.String outputName)
ServiceOperations matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignores the parameter (matches all).getOperations in interface Servicepublic Iterator getAllEventSources()
ServiceEventSources of this service.getAllEventSources in interface Servicepublic EventSource getEventSource(QName portType, java.lang.String eventName, java.lang.String inputName, java.lang.String outputName)
ServiceEventSource matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignore it (matches all).getEventSource in interface Servicepublic Iterator getEventSources(QName portType, java.lang.String eventName, java.lang.String inputName, java.lang.String outputName)
ServiceEventSources matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignore it (matches all).getEventSources in interface Servicepublic CustomAttributeValue getPortTypeAttribute(QName portTypeName, QName attributeName)
Servicename for the port type
with the specified unique portTypeName or with null if this attribute
is not available (or if its value is explicitly set to null).
This method throws a java.lang.IllegalArgumentException if a port type with the
given portTypeName is not found within this service instance.
getPortTypeAttribute in interface ServiceportTypeName - the unique name of the port type within the scope of this service instance, see Service.getPortTypes()attributeName - the name of the port type attribute to query the value ofnullpublic void setPortTypeAttribute(QName portTypeName, QName attributeName, CustomAttributeValue value)
value of the port type attribute with the specified name of
the port type with the given unique portTypeName. Throws a
java.lang.IllegalArgumentException in case there is no port type with the given
portTypeName within this service instance or if name is null.portTypeName - the unique name of the port type within the scope of this service instance, see Service.getPortTypes()attributeName - the name of the port type attribute to set, must not be nullvalue - the value to set the named port type attribute to (may be nulljava.lang.IllegalArgumentException - if there is no port type with the given portTypeName within this service instance or if
name is nullpublic HashMap getPortTypeAttributes(QName portTypeName)
ServiceportTypeName. Note that depending on the actual implementation
the returned reference may point at the 'life map', i .e. the actual storage for the port type
attributes. Thus, modifications to that map should be performed with care and keeping this in
mind.
This method throws a java.lang.IllegalArgumentException if a port type with the
given portTypeName is not found within this instance.
getPortTypeAttributes in interface ServiceportTypeName - the unique name of the port type within the scope of this instance, see Service.getPortTypes()public void setPortTypeAttributes(QName portTypeName, HashMap attributes)
portTypeName at once to
those contained within argument attributes. Note that depending on the actual
implementation, it is possible that the map attributes points at may be used for
the actual internal storage of the port type attributes (i.e. without copying it). That is why,
after passing it to this method, modifications to this map should be made with care. This
method throws a java.lang.IllegalArgumentException in case attributes
is null.portTypeName - the unique name of the port type within the scope of this service instance, see Service.getPortTypes()attributes - the new port type attributes to setjava.lang.IllegalArgumentException - if no port type with the given portTypeName is found or if attributes is
nullpublic boolean hasPortTypeAttributes(QName portTypeName)
Servicetrue only if this service instance has at least one port type attribute
set for the port type with the specified unique portTypeName. Returns false
in any other case, including when there is no port type with the given
portTypeName.hasPortTypeAttributes in interface ServiceportTypeName - the unique name of the port type within the scope of this service instance, see Service.getPortTypes()true only if there is at least one port type attribute set for the named port type within
this service instancepublic UnknownDataContainer[] getCustomMData(java.lang.String communicationManagerId)
getCustomMData in interface Serviceprotected void processWSDLPortType(WSDLPortType portType)
protected abstract Operation createOperation(WSDLOperation wsdlOperation)
Operation instance suitable for usage within this service instance. This
method is only called from within processWSDLPortType(WSDLPortType) and should not be
used in other contexts.wsdlOperation - the WSDL operation describing the operation to createprotected abstract EventSource createEventSource(WSDLOperation wsdlOperation)
DefaultEventSource instance suitable for usage within this service instance.
This method is only called from within processWSDLPortType(WSDLPortType) and should
not be used in other contexts.wsdlOperation - the WSDL operation describing the event source to createpublic Iterator getDescriptions()
ServicegetDescriptions in interface Serviceprotected WSDL getExistingDescription(java.lang.String targetNamespace)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object