public class PublishProv extends eventweb.servutil.EvwSrvcBase implements LegacySrvcProv
Publishes messages by topic.
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
DEP_LIST
Class dependencies
|
static int |
MAX_MSG_SIZE
Maximum expected message size (send or receive)
|
static int |
PREF_ACTIVITY_TMO
Preferred activity timeout
|
static java.lang.String[] |
pubSubList |
static java.lang.String[] |
rsrcList
Supported resource requests
|
static java.util.List<java.lang.Integer> |
SUPPORTED_MEDIA
MIME types supported by the service, in order of preference.
|
static java.util.TreeSet<java.lang.String> |
tagList
Supported request tags
|
static java.lang.String |
VERSION
Class version
|
IF_VERSION
IF_VERSION
Constructor and Description |
---|
PublishProv()
Create a new PublishProv instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
addSubscription(TvOutput subscriber,
java.lang.String pubTopic) |
int |
dispatchRqst(TvList msgRec,
TvOutput chnl,
java.lang.String[] srvrCmd)
Dispatch channel request.
|
protected void |
dumpSubscriptions() |
int |
getMaxMsgSize()
Get the maximum message size expected by the service.
|
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 |
handleDisconnect(TvOutput client)
Clean up after the client disconnects.
|
void |
init(eventweb.servutil.SrvcRegistry registry,
TvList params)
Initialize the provider.
|
void |
listSubscriptions(java.lang.String pubTopic,
TvOutput toClient) |
int |
publish(TvList publication,
TvOutput toPublisher) |
void |
quiesce()
Stop accepting new requests and release resources
|
boolean |
removeSubscription(TvOutput subscriber,
java.lang.String pubTopic) |
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 static final java.util.TreeSet<java.lang.String> tagList
public static final java.util.List<java.lang.Integer> SUPPORTED_MEDIA
public static final int MAX_MSG_SIZE
public static final int PREF_ACTIVITY_TMO
public static final java.lang.String[] rsrcList
public static final java.lang.String[] pubSubList
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 java.util.Set<java.lang.String> getSupportedTags()
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 dispatchRqst(TvList msgRec, TvOutput chnl, java.lang.String[] srvrCmd)
dispatchRqst
in interface SrvcProvImp
msgRec
- The client request messagechnl
- Connection back to the clientsrvrCmd
- Allows a command to be passed back to the server.public void handleDisconnect(TvOutput client)
SrvcProvImp
handleDisconnect
in interface SrvcProvImp
client
- The channel to the client that has disconnectedpublic boolean addSubscription(TvOutput subscriber, java.lang.String pubTopic)
public boolean removeSubscription(TvOutput subscriber, java.lang.String pubTopic)
public void listSubscriptions(java.lang.String pubTopic, TvOutput toClient)
public void quiesce()
protected void dumpSubscriptions()