public class RqstRouterSrvcConn extends AbstractEvwSrvcConn implements HttpSrvcConn, TvEventListener, ProviderHost, eventweb.servutil.SelfDescribing
This implements an EventWeb service that can support multiple service providers specified at runtime.
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 |
static java.lang.String |
VERSION
Class version
|
instanceNumber, srvcName, TAG_DISCONNECT, TAG_RQST_CTRL, TAG_RQST_RSRC, TAG_SRVC_INFO, TAG_TIMESTAMP, VALUE_CONNECT
IF_VERSION
IF_VERSION
IF_VERSION
IF_VERSION
IF_VERSION
IF_VERSION
Constructor and Description |
---|
RqstRouterSrvcConn() |
Modifier and Type | Method and Description |
---|---|
boolean |
addProv(java.lang.Class<? extends RsrcProv> pClass,
TvList pParams)
Add a resource provider.
|
boolean |
addSrvcProv(LegacySrvcProv newProv) |
boolean |
addTvEventProv(TvEventProv newProv) |
int |
getMaxMsgSize()
Get the maximum message size expected by the service.
|
protected void |
getProvInfo(LegacySrvcProv newProv) |
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.
|
protected void |
handleDisconnect(TvOutput client) |
void |
handleTvEvent(TvEvent evt)
Process new event.
|
void |
init(eventweb.servutil.SrvcRegistry registry,
TvList params)
Initialize the service.
|
protected void |
newClient(SrvrChan chan,
TvList rqst) |
protected ProvMap |
newRuntimeMap()
Add new context provider instances to the provider map.
|
int |
performSrvc(SrvcInfo sInfo,
java.io.OutputStream outStrm)
Perform the requested service.
|
int |
prepareSrvc(SrvcInfo sInfo)
Validate request and prepare service to run.
|
protected int |
processFcRqst(TvList msg,
TvOutput chnl,
java.lang.String[] srvrCmd) |
void |
quiesce()
Stop accepting new requests and release resources
|
int |
suggestActivityTimeout()
Suggest an activity timeout for the service.
|
createChannel, processCtrlRqst, startChannel
isDebugging, isTracingIo, setDebugging, setTracingIo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTracingIo, setTracingIo
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 void init(eventweb.servutil.SrvcRegistry registry, TvList params)
init
in interface eventweb.servutil.RegInit
init
in class eventweb.servutil.EvwSrvcBase
registry
- The service registryparams
- Initialization parameterspublic boolean addProv(java.lang.Class<? extends RsrcProv> pClass, TvList pParams)
addProv
in interface ProviderHost
pClass
- The class of the provider to addpParams
- Parameters for provider init methodpublic boolean addSrvcProv(LegacySrvcProv newProv)
public boolean addTvEventProv(TvEventProv newProv)
public java.util.Set<java.lang.String> getSupportedTags()
eventweb.servutil.SelfDescribing
getSupportedTags
in interface eventweb.servutil.SelfDescribing
public java.util.Set<java.lang.String> getSupportedValues(java.lang.String tag)
getSupportedValues
in interface eventweb.servutil.SelfDescribing
tag
- The tag to get values for.public java.util.List<java.lang.Integer> getSupportedMedia()
getSupportedMedia
in interface eventweb.servutil.SelfDescribing
MimeType
public int getMaxMsgSize()
getMaxMsgSize
in interface eventweb.servutil.SelfDescribing
public int suggestActivityTimeout()
suggestActivityTimeout
in interface eventweb.servutil.SelfDescribing
public int prepareSrvc(SrvcInfo sInfo)
prepareSrvc
in interface HttpSrvcConn
sInfo
- Service request informationpublic int performSrvc(SrvcInfo sInfo, java.io.OutputStream outStrm)
performSrvc
in interface HttpSrvcConn
sInfo
- Service request informationoutStrm
- OutputStream to clientpublic void handleTvEvent(TvEvent evt)
TvEventListener
handleTvEvent
in interface TvEventListener
evt
- The event to be processed.public void quiesce()
quiesce
in interface HttpSrvcConn
quiesce
in class AbstractEvwSrvcConn
protected void getProvInfo(LegacySrvcProv newProv)
protected ProvMap newRuntimeMap()
protected void handleDisconnect(TvOutput client)