public class RouterProvFtry extends eventweb.servutil.EvwSrvcBase implements SrvcProvFtry, TvEventListener
This implements an EventWeb service provider that can support
multiple child service providers specified at runtime.
This version instantiates private (client) context service providers
as they are first accessed instead of all at once when the client
first connects.
| Modifier and Type | Class and Description |
|---|---|
class |
RouterProvFtry.RouterProvImp |
| Modifier and Type | Field and Description |
|---|---|
int |
activityTmo
Longest activity timeout for any service provider
|
static java.lang.String[] |
DEP_LIST
Class dependencies
|
int |
maxMsgSize
Maximum expected message size (send or receive)
|
java.util.List<java.lang.Integer> |
supportedMedia
MIME types supported by the service, in order of preference.
|
static java.lang.String |
VERSION
Class version
|
IF_VERSIONIF_VERSIONIF_VERSION| Constructor and Description |
|---|
RouterProvFtry()
Create a new (uninitialized) RouterProvFtry instance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addFtryProv(SrvcProvFtry newProv) |
protected boolean |
addModule(ModuleSpec spec)
Add a resource provider given by a ModuleSpec.
|
boolean |
addProv(java.lang.Class<?> pClass,
TvList pParams)
Add a resource provider.
|
boolean |
addTvEventProv(TvEventProv newProv) |
protected void |
configure(TvList configList) |
protected void |
finalize()
Perform instance cleanup at termination.
|
int |
getMaxMsgSize()
Get the maximum message size expected by the service.
|
java.util.Set<SrvcProvFtry> |
getProvSet()
Get the available providers
|
java.util.List<java.lang.Integer> |
getSupportedMedia()
Get the MIME types supported by the service.
|
java.util.Set<java.lang.String> |
getSupportedTags()
Get the tags supported by the service.
|
java.util.Set<java.lang.String> |
getSupportedValues(java.lang.String tag)
Get the values that are valid for a tag.
|
void |
handleTvEvent(TvEvent evt)
Process new event.
|
void |
init(eventweb.servutil.SrvcRegistry registry,
TvList params)
Initialize the provider
|
RouterProvFtry.RouterProvImp |
newClient()
Get a SrvcProvImp for a new client
|
void |
quiesce()
Stop accepting new requests and release resources
|
int |
suggestActivityTimeout()
Suggest an activity timeout for the service.
|
public static final java.lang.String VERSION
public static final java.lang.String[] DEP_LIST
public java.util.List<java.lang.Integer> supportedMedia
public int maxMsgSize
public int activityTmo
public RouterProvFtry()
public void init(eventweb.servutil.SrvcRegistry registry,
TvList params)
init in interface eventweb.servutil.RegInitinit in class eventweb.servutil.EvwSrvcBaseregistry - The service registryparams - Initialization parameterspublic boolean addProv(java.lang.Class<?> pClass,
TvList pParams)
pClass - The class of the provider to addpParams - Parameters for provider init methodpublic java.util.Set<java.lang.String> getSupportedTags()
getSupportedTags in interface eventweb.servutil.SelfDescribingpublic java.util.Set<java.lang.String> getSupportedValues(java.lang.String tag)
getSupportedValues in interface eventweb.servutil.SelfDescribingtag - The tag to get values for.public java.util.List<java.lang.Integer> getSupportedMedia()
getSupportedMedia in interface eventweb.servutil.SelfDescribingMimeTypepublic int getMaxMsgSize()
getMaxMsgSize in interface eventweb.servutil.SelfDescribingpublic int suggestActivityTimeout()
suggestActivityTimeout in interface eventweb.servutil.SelfDescribingpublic RouterProvFtry.RouterProvImp newClient()
newClient in interface SrvcProvFtrypublic void handleTvEvent(TvEvent evt)
TvEventListenerhandleTvEvent in interface TvEventListenerevt - The event to be processed.public boolean addFtryProv(SrvcProvFtry newProv)
public boolean addTvEventProv(TvEventProv newProv)
public java.util.Set<SrvcProvFtry> getProvSet()
public void quiesce()
protected void configure(TvList configList)
protected boolean addModule(ModuleSpec spec)
spec - The ModuleSpec for the providerprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable