|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ws4d.java.dispatch.DefaultServiceReference
public class DefaultServiceReference
Class holds service reference.
Field Summary |
---|
Fields inherited from interface org.ws4d.java.service.reference.Reference |
---|
LOCATION_LOCAL, LOCATION_REMOTE, LOCATION_UNKNOWN |
Method Summary | |
---|---|
void |
buildUpService()
Instructs this service reference to asynchronously send a GetMetadata message to the service and create a new proxy, if required. |
boolean |
containsAllPortTypes(QNameSet newTypes)
Returns true only in case this service reference provides
all port types listed within argumentportTypes . |
void |
disconnectFromDevice()
Removes the parent device reference from this service reference. |
Iterator |
getEprInfos()
Gets endpoint references. |
int |
getLocation()
Returns the location of the device or service, which may be - LOCATION_UNKNOWN, - LOCATION_REMOTE, - LOCATION_LOCAL. |
Iterator |
getMetadataLocations()
Returns an iterator over the set of URI instances pointing at the
addresses of the target service's metadata description locations (i.e. |
Iterator |
getMetadataReferences()
Returns an iterator over the set of EndpointReference instances
pointing at the locations of the target service's metadata descriptions
(i.e. usually its WSDL files). |
XAddressInfo |
getNextXAddressInfoAfterFailure(URI transportAddress)
|
DeviceReference |
getParentDeviceRef()
Returns the parent device reference of the device which hosts the service, if the device is known. |
int |
getPortTypeCount()
Returns the number of port types for this service reference. |
Iterator |
getPortTypes()
Gets service port types. |
java.lang.String |
getPreferredCommunicationManagerID()
Returns the ID of the communication protocol to use when communicating with this reference's target over the current preferred transport address . |
URI |
getPreferredXAddress()
Returns the preferred transport address for communication with this reference. |
XAddressInfo |
getPreferredXAddressInfo()
|
Service |
getService()
Gets present service of reference. |
Service |
getService(boolean doBuildUp)
Gets present service of reference. |
URI |
getServiceId()
Returns the service ID (unique within the scope of its parent device). |
Iterator |
getWSDLs()
Returns an iterator over the set of WSDL instances describing the
target service. |
boolean |
isSecureService()
Returns whether or not the service is secured |
boolean |
isServiceObjectExisting()
Returns whether the service is build up or not. |
Service |
rebuildService()
|
void |
reset()
Resets this service reference, i.e. makes it loose all internal state information but the endpoint references of the service. |
void |
setHostedFromService(HostedMData newHosted,
java.lang.String comManId,
ProtocolData protocolData)
|
void |
setLocation(int location)
Location of service, which this reference is linked to. |
void |
setMetaDataLocations(URISet metaLocs)
|
void |
setMetadataReferences(EndpointReferenceSet metaRefs)
Updates metadata references. |
void |
setParentDeviceReference(DeviceReference devRef)
|
Service |
setService(LocalService service,
HostedMData hosted)
Sets local service, replaces present service. |
void |
setWSDLs(DataStructure wsdls)
Updates WSDLs linked to this service |
java.lang.String |
toString()
|
void |
update(HostedMData newHostedBlock,
DeviceReference devRef,
ProtocolData protocolData)
Update service references with hosted metadata. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public Service getService() throws TimeoutException
ServiceReference
WSDLRepository
or by sending a get metadata message.
getService
in interface ServiceReference
TimeoutException
- This exception is thrown if the remote service
doesn't answer to the get metadata message, which tries to
receive the necessary data to build up the service. The
timeout value can be configured in the
DispatchingProperties
via the method
DispatchingProperties.setResponseWaitTime(int)
.public Service getService(boolean doBuildUp) throws TimeoutException
ServiceReferenceInternal
WSDLRepository
or by sending a get metadata message.
getService
in interface ServiceReferenceInternal
doBuildUp
- If false
and service does not exist,
service will not be build up. In this case, returned service
is null
TimeoutException
- This exception is thrown if the remote service
doesn't answer to the get metadata message, which tries to
receive the necessary data to build up the service. The
timeout value can be configured in the
DispatchingProperties
via the method
DispatchingProperties.setResponseWaitTime(int)
.public void buildUpService()
ServiceListener.serviceCreated(ServiceReference, Service)
method.
Note that in order to reduce network traffic a GetMetadata message will actually be sent only if it is detected that the service within this device reference instance is not up to date anymore.
public Service setService(LocalService service, HostedMData hosted)
ServiceReferenceInternal
setService
in interface ServiceReferenceInternal
service
- replacement service.hosted
- the hosted block of the service
public Service rebuildService() throws TimeoutException
TimeoutException
public void reset()
ServiceReference
reset
in interface ServiceReference
public void update(HostedMData newHostedBlock, DeviceReference devRef, ProtocolData protocolData)
update
in interface ServiceReferenceInternal
endpoint
- Endpoint references to set.public void disconnectFromDevice()
ServiceReferenceInternal
disconnectFromDevice
in interface ServiceReferenceInternal
public Iterator getPortTypes()
ServiceReference
getPortTypes
in interface ServiceReference
public int getPortTypeCount()
ServiceReference
getPortTypeCount
in interface ServiceReference
public boolean containsAllPortTypes(QNameSet newTypes)
ServiceReference
true
only in case this service reference provides
all port types listed within argumentportTypes
.
containsAllPortTypes
in interface ServiceReference
newTypes
- the port types to check this service reference for
true
if all port types are provided by this service
reference, false
otherwisepublic int getLocation()
Reference
getLocation
in interface Reference
public void setLocation(int location)
Reference.LOCATION_LOCAL
,
Reference.LOCATION_REMOTE
or
Reference.LOCATION_UNKNOWN
setLocation
in interface ServiceReferenceInternal
location
- Reference.LOCATION_LOCAL
,
Reference.LOCATION_REMOTE
or
Reference.LOCATION_UNKNOWN
.public Iterator getEprInfos()
ServiceReference
getEprInfos
in interface ServiceReference
public URI getServiceId()
ServiceReference
getServiceId
in interface ServiceReference
public Iterator getMetadataReferences()
EndpointReference
instances
pointing at the locations of the target service's metadata descriptions
(i.e. usually its WSDL files).
getMetadataReferences
in interface ServiceReference
EndpointReference
s to the service's
metadatapublic Iterator getMetadataLocations()
URI
instances pointing at the
addresses of the target service's metadata description locations (i.e.
usually its WSDL files).
getMetadataLocations
in interface ServiceReference
URI
s to the service's metadatapublic Iterator getWSDLs()
WSDL
instances describing the
target service.
getWSDLs
in interface ServiceReference
WSDL
s containing the service's metadatapublic URI getPreferredXAddress() throws TimeoutException
Reference
getPreferredXAddress
in interface Reference
TimeoutException
- if no suitable transport address can be detectedpublic java.lang.String getPreferredCommunicationManagerID() throws TimeoutException
Reference
preferred transport address
. Will return
the framework-wide
default communication ID
, if no preferred transport address has been
explicitly set.
getPreferredCommunicationManagerID
in interface Reference
TimeoutException
- if no suitable transport address can be detectedpublic XAddressInfo getPreferredXAddressInfo() throws TimeoutException
getPreferredXAddressInfo
in interface ServiceReferenceInternal
TimeoutException
public XAddressInfo getNextXAddressInfoAfterFailure(URI transportAddress) throws TimeoutException
getNextXAddressInfoAfterFailure
in interface ServiceReferenceInternal
TimeoutException
public void setParentDeviceReference(DeviceReference devRef)
setParentDeviceReference
in interface ServiceReferenceInternal
devRef
- public DeviceReference getParentDeviceRef()
ServiceReference
getParentDeviceRef
in interface ServiceReference
public boolean isServiceObjectExisting()
ServiceReference
isServiceObjectExisting
in interface ServiceReference
true
, if service object exists.public boolean isSecureService()
ServiceReference
isSecureService
in interface ServiceReference
public void setHostedFromService(HostedMData newHosted, java.lang.String comManId, ProtocolData protocolData)
public void setMetaDataLocations(URISet metaLocs)
setMetaDataLocations
in interface ServiceReferenceInternal
public void setMetadataReferences(EndpointReferenceSet metaRefs)
ServiceReferenceInternal
setMetadataReferences
in interface ServiceReferenceInternal
public void setWSDLs(DataStructure wsdls)
ServiceReferenceInternal
setWSDLs
in interface ServiceReferenceInternal
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |