org.ws4d.java.dispatch
Interface ServiceReferenceInternal

All Superinterfaces:
Reference, ServiceReference
All Known Implementing Classes:
DefaultServiceReference

public interface ServiceReferenceInternal
extends ServiceReference

Interface covers the methods used internally to manage service references.


Field Summary
 
Fields inherited from interface org.ws4d.java.service.reference.Reference
LOCATION_LOCAL, LOCATION_REMOTE, LOCATION_UNKNOWN
 
Method Summary
 void disconnectFromDevice()
          Removes the parent device reference from this service reference.
 XAddressInfo getNextXAddressInfoAfterFailure(URI transportAddress)
           
 XAddressInfo getPreferredXAddressInfo()
           
 Service getService(boolean doBuildUp)
          Gets present service of reference.
 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
 void update(HostedMData newHostedBlock, DeviceReference devRef, ProtocolData protocolData)
          Update service references with hosted metadata.
 
Methods inherited from interface org.ws4d.java.service.reference.ServiceReference
containsAllPortTypes, getEprInfos, getMetadataLocations, getMetadataReferences, getParentDeviceRef, getPortTypeCount, getPortTypes, getService, getServiceId, getWSDLs, isSecureService, isServiceObjectExisting, reset
 
Methods inherited from interface org.ws4d.java.service.reference.Reference
getLocation, getPreferredCommunicationManagerID, getPreferredXAddress
 

Method Detail

getService

Service getService(boolean doBuildUp)
                   throws TimeoutException
Gets present service of reference. If the service is remote and its proxy not built up, the proxy may be built by an existing WSDL within the WSDLRepository or by sending a get metadata message.

Parameters:
doBuildUp - If false and service does not exist, service will not be build up. In this case, returned service is null
Returns:
service The present service of this reference. The returned service may change.
Throws:
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).

setService

Service setService(LocalService service,
                   HostedMData hosted)
Sets local service, replaces present service. Used to set local services.

Parameters:
service - replacement service.
hosted - the hosted block of the service
Returns:
replaced service.

update

void update(HostedMData newHostedBlock,
            DeviceReference devRef,
            ProtocolData protocolData)
Update service references with hosted metadata. If new metadata lacks of previous transmitted port types, the associated service is removed. If new metadata includes new port types, service is updated.

Parameters:
endpoint - Endpoint references to set.

disconnectFromDevice

void disconnectFromDevice()
Removes the parent device reference from this service reference.


setParentDeviceReference

void setParentDeviceReference(DeviceReference devRef)
Parameters:
devRef -

setLocation

void setLocation(int location)
Location of service, which this reference is linked to. Allowed values:
  • Reference.LOCATION_LOCAL,
  • Reference.LOCATION_REMOTE or
  • Reference.LOCATION_UNKNOWN

    Parameters:
    location - Reference.LOCATION_LOCAL, Reference.LOCATION_REMOTE or Reference.LOCATION_UNKNOWN.

  • setMetaDataLocations

    void setMetaDataLocations(URISet metaLocs)
    Parameters:
    metaLocs -

    setMetadataReferences

    void setMetadataReferences(EndpointReferenceSet metaRefs)
    Updates metadata references.

    Parameters:
    metaRefs -

    setWSDLs

    void setWSDLs(DataStructure wsdls)
    Updates WSDLs linked to this service

    Parameters:
    wsdls -

    getPreferredXAddressInfo

    XAddressInfo getPreferredXAddressInfo()
                                          throws TimeoutException
    Throws:
    TimeoutException

    getNextXAddressInfoAfterFailure

    XAddressInfo getNextXAddressInfoAfterFailure(URI transportAddress)
                                                 throws TimeoutException
    Throws:
    TimeoutException