public abstract class AbstractSuppliersBroker<S extends Supplier,T extends SupplierService> extends Object implements SuppliersBroker<S,T>
Constructor and Description |
---|
AbstractSuppliersBroker() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createSupplierService(S supplier)
Creates a supplier service for use by the specified supplier.
|
Set<S> |
getSuppliers()
Returns the set of all currently registered suppliers.
|
protected void |
invalidateSupplierService(T service)
Invalidates the specified supplier service to prevent its further use.
|
T |
registerSupplier(S supplier)
Registers a new supplier and issues it a service interface through which
the supplier can submit information.
|
void |
unregisterSupplier(S supplier)
Cancels supplier registration using the supplier id.
|
protected abstract T createSupplierService(S supplier)
supplier
- supplier for which to create a supplier serviceprotected void invalidateSupplierService(T service)
The default implementation will attempt to use
AbstractSupplierService.invalidate()
if the given supplier
service descends from AbstractSupplierService
.
service
- service to be invalidatedpublic T registerSupplier(S supplier)
SuppliersBroker
registerSupplier
in interface SuppliersBroker<S extends Supplier,T extends SupplierService>
supplier
- supplier of network informationpublic void unregisterSupplier(S supplier)
SuppliersBroker
unregisterSupplier
in interface SuppliersBroker<S extends Supplier,T extends SupplierService>
supplier
- the supplier to be unregisteredpublic Set<S> getSuppliers()
SuppliersBroker
getSuppliers
in interface SuppliersBroker<S extends Supplier,T extends SupplierService>
Copyright © 2015. All Rights Reserved.