|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IServiceInfoFactory
Service info factory service contract. A service info factory is used by the
EndpointDescriptionAdvertiser
to convert EndpointDescription
s
to IServiceInfo
instances (via
createServiceInfo(IDiscoveryAdvertiser, EndpointDescription)
. The
resulting IServiceInfo instances are then used to by the
EndpointDescriptionAdvertiser
to publish the EndpointDescription
metadata to a IDiscoveryAdvertiser
.
If no other instances of this service have been registered, a default
instance of ServiceInfoFactory
will be used by the
EndpointDescriptionAdvertiser
. Note that this default instance is
registered with the lowest possible priority, so that if other
IServiceInfoFactory
instances are registered, they will be
preferred/used over the default. This means that Those wishing to
customize/control this process of converting EndpointDescription
s to
IServiceInfo
must
IServiceInfoFactory
Integer.MIN_VALUE
EndpointDescriptionAdvertiser
,
the new service info factory will be used.
IDiscoveredEndpointDescriptionFactory
Method Summary | |
---|---|
IServiceInfo |
createServiceInfo(IDiscoveryAdvertiser advertiser,
EndpointDescription endpointDescription)
Create an service info instance to represent the given endpointDescription for discovery using the given discovery advertiser. |
IServiceInfo |
removeServiceInfo(IDiscoveryAdvertiser advertiser,
EndpointDescription endpointDescription)
Remove any previously created service info that is associated with the given endpointDescription (and advertiser). |
Method Detail |
---|
IServiceInfo createServiceInfo(IDiscoveryAdvertiser advertiser, EndpointDescription endpointDescription)
advertiser
- the advertiser to use for creating the service info result.
Must not be null
.endpointDescription
- the endpoint description that the service info is to
represent. Must not be null
.
IDiscoveryAdvertiser.registerService(IServiceInfo)
. If a
service info instance has previously been created for the given
endpointDescription by this service info factory, then that
serviceInfo will be returned in favor of creating a new one.
Otherwise, a new service info will be created and returned. If
some error occurs in the creation of the serviceInfo,
null
will be returned.IServiceInfo removeServiceInfo(IDiscoveryAdvertiser advertiser, EndpointDescription endpointDescription)
advertiser
- the advertiser associated with the service info previously
created. Must not be null
.endpointDescription
- the endpoint description that the service info was previously
created for. Must not be null
.
null
no service info exists that had previously been
created for the given endpointDescription and advertiser.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |