|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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
ServiceReferenceWSDLRepository or by sending a get metadata message.
getService in interface ServiceReferenceTimeoutException - 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
ServiceReferenceInternalWSDLRepository or by sending a get metadata message.
getService in interface ServiceReferenceInternaldoBuildUp - 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 ServiceReferenceInternalservice - replacement service.hosted - the hosted block of the service
public Service rebuildService()
throws TimeoutException
TimeoutExceptionpublic void reset()
ServiceReference
reset in interface ServiceReference
public void update(HostedMData newHostedBlock,
DeviceReference devRef,
ProtocolData protocolData)
update in interface ServiceReferenceInternalendpoint - Endpoint references to set.public void disconnectFromDevice()
ServiceReferenceInternal
disconnectFromDevice in interface ServiceReferenceInternalpublic Iterator getPortTypes()
ServiceReference
getPortTypes in interface ServiceReferencepublic int getPortTypeCount()
ServiceReference
getPortTypeCount in interface ServiceReferencepublic boolean containsAllPortTypes(QNameSet newTypes)
ServiceReferencetrue only in case this service reference provides
all port types listed within argumentportTypes.
containsAllPortTypes in interface ServiceReferencenewTypes - 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 Referencepublic void setLocation(int location)
Reference.LOCATION_LOCAL,
Reference.LOCATION_REMOTE or
Reference.LOCATION_UNKNOWN
setLocation in interface ServiceReferenceInternallocation - Reference.LOCATION_LOCAL,
Reference.LOCATION_REMOTE or
Reference.LOCATION_UNKNOWN.public Iterator getEprInfos()
ServiceReference
getEprInfos in interface ServiceReferencepublic URI getServiceId()
ServiceReference
getServiceId in interface ServiceReferencepublic Iterator getMetadataReferences()
EndpointReference instances
pointing at the locations of the target service's metadata descriptions
(i.e. usually its WSDL files).
getMetadataReferences in interface ServiceReferenceEndpointReferences 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 ServiceReferenceURIs to the service's metadatapublic Iterator getWSDLs()
WSDL instances describing the
target service.
getWSDLs in interface ServiceReferenceWSDLs containing the service's metadata
public URI getPreferredXAddress()
throws TimeoutException
Reference
getPreferredXAddress in interface ReferenceTimeoutException - if no suitable transport address can be detected
public java.lang.String getPreferredCommunicationManagerID()
throws TimeoutException
Referencepreferred transport address. Will return
the framework-wide
default communication ID, if no preferred transport address has been
explicitly set.
getPreferredCommunicationManagerID in interface ReferenceTimeoutException - if no suitable transport address can be detected
public XAddressInfo getPreferredXAddressInfo()
throws TimeoutException
getPreferredXAddressInfo in interface ServiceReferenceInternalTimeoutException
public XAddressInfo getNextXAddressInfoAfterFailure(URI transportAddress)
throws TimeoutException
getNextXAddressInfoAfterFailure in interface ServiceReferenceInternalTimeoutExceptionpublic void setParentDeviceReference(DeviceReference devRef)
setParentDeviceReference in interface ServiceReferenceInternaldevRef - public DeviceReference getParentDeviceRef()
ServiceReference
getParentDeviceRef in interface ServiceReferencepublic boolean isServiceObjectExisting()
ServiceReference
isServiceObjectExisting in interface ServiceReferencetrue, 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 ServiceReferenceInternalpublic void setMetadataReferences(EndpointReferenceSet metaRefs)
ServiceReferenceInternal
setMetadataReferences in interface ServiceReferenceInternalpublic 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 | ||||||||