Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jreceiver.client.rio.servlet
Class RioHostTags  view RioHostTags download RioHostTags.java

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byjreceiver.client.rio.servlet.RioHostBase
              extended byjreceiver.client.rio.servlet.RioHostTags
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RioHostTags
extends RioHostBase

Servlet answering 'tags' requests from Rio Server.

Called by the server (via the service method) to allow a servlet to handle a GET request.

Some sample URLs:

http://.../tags

It is asking for a simple list of available tags:

fid title artist source year comment length type path genre bitrate playlist codec offset duration tracknr

If it asks for the special 0x100 file id...

http://.../tags/100

where '100' is a hex number representing the fileid for the default playlist, which consists of all tracks. Send back a description of that "All Tracks" playlist.

Otherwise it will ask for tag info for a specific tune or playlist

http://.../tags/2b0

where '2b0' is a hex number representing the src id for that tune or playlist.

Version:
$Revision: 1.7 $ $Date: 2002/12/29 00:44:07 $

Field Summary
static int KEY_ALBUM
           
static int KEY_ARTIST
           
static int KEY_BITRATE
           
static int KEY_CODEC
           
static int KEY_COMMENT
           
static int KEY_DATA_OFFSET
           
static int KEY_DURATION
           
static int KEY_FILEPATH
           
static int KEY_FILESIZE
           
static int KEY_GENRE
           
static int KEY_PLAYLIST
           
static int KEY_SRC_ID
           
static int KEY_SRCTYPE
           
static int KEY_TITLE
           
static int KEY_TRACKNO
           
static int KEY_YEAR
           
protected static org.apache.commons.logging.Log log
          logging sink
protected static byte[] playlist_pattern
          Create the pattern for the calls to MessageFormatB to encode playlist tags for the Rio.
protected  jreceiver.common.rpc.TagEncoder tag_rpc
          the server which hosts the data
protected static byte[] tune_pattern
          Create the pattern for the calls to MessageFormatB to encode tune tags for the Rio.
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
RioHostTags()
           
 
Method Summary
protected  void handleRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, int src_id)
          subclasses must define this
 void init()
          Init
protected  boolean requireMfileId()
          DON'T implicitly fail if no src_id is provided in the * query
 
Methods inherited from class jreceiver.client.rio.servlet.RioHostBase
doGet
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_SRC_ID

public static final int KEY_SRC_ID
See Also:
Constant Field Values

KEY_TITLE

public static final int KEY_TITLE
See Also:
Constant Field Values

KEY_ARTIST

public static final int KEY_ARTIST
See Also:
Constant Field Values

KEY_ALBUM

public static final int KEY_ALBUM
See Also:
Constant Field Values

KEY_YEAR

public static final int KEY_YEAR
See Also:
Constant Field Values

KEY_COMMENT

public static final int KEY_COMMENT
See Also:
Constant Field Values

KEY_FILESIZE

public static final int KEY_FILESIZE
See Also:
Constant Field Values

KEY_SRCTYPE

public static final int KEY_SRCTYPE
See Also:
Constant Field Values

KEY_FILEPATH

public static final int KEY_FILEPATH
See Also:
Constant Field Values

KEY_GENRE

public static final int KEY_GENRE
See Also:
Constant Field Values

KEY_BITRATE

public static final int KEY_BITRATE
See Also:
Constant Field Values

KEY_PLAYLIST

public static final int KEY_PLAYLIST
See Also:
Constant Field Values

KEY_CODEC

public static final int KEY_CODEC
See Also:
Constant Field Values

KEY_DATA_OFFSET

public static final int KEY_DATA_OFFSET
See Also:
Constant Field Values

KEY_DURATION

public static final int KEY_DURATION
See Also:
Constant Field Values

KEY_TRACKNO

public static final int KEY_TRACKNO
See Also:
Constant Field Values

tag_rpc

protected jreceiver.common.rpc.TagEncoder tag_rpc
the server which hosts the data


tune_pattern

protected static byte[] tune_pattern
Create the pattern for the calls to MessageFormatB to encode tune tags for the Rio.


playlist_pattern

protected static byte[] playlist_pattern
Create the pattern for the calls to MessageFormatB to encode playlist tags for the Rio.


log

protected static org.apache.commons.logging.Log log
logging sink

Constructor Detail

RioHostTags

public RioHostTags()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Description copied from class: RioHostBase
Init

Overrides:
init in class RioHostBase

handleRequest

protected void handleRequest(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse resp,
                             int src_id)
                      throws javax.servlet.ServletException,
                             java.io.IOException,
                             jreceiver.common.rpc.RpcException
subclasses must define this

Specified by:
handleRequest in class RioHostBase

requireMfileId

protected boolean requireMfileId()
DON'T implicitly fail if no src_id is provided in the * query

Specified by:
requireMfileId in class RioHostBase