|
|||||||||
| Home >> All >> jreceiver >> client >> rio >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jreceiver.client.rio.servlet
Class RioHostResults

java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
jreceiver.client.rio.servlet.RioHostBase
jreceiver.client.rio.servlet.RioHostResults
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class RioHostResults
- extends RioHostBase
Servlet answering 'result' requests from Rio Server.
Called by the Rio Receiver to retrieve tune fileids and titles (if text)
TEXT RESPONSE
A request for text will be made with the "_extended=1" option. All other responses will be in binary -- see below.
A text request like
http://...:12078/results?artist=&_extended=1
will return results for all known artists with song titles as
160=TAll Of A Sudden (It's Too Late) 1c0=TBall And Chain 180=TEnglish Roundabout 1f0=TFly On The Wall 120=TIt's Nearly Africa 1d0=TSenses Working Overtime
The same goes if you replace 'artist' with 'title', 'source'(album) or 'genre'.
Add the exact artist name
http://...:12078/results?artist=Billie%20Holiday&_extended=1
BINARY RESPONSE
Two possibilities:
1. Two DWORDs - this is used when the query contains "_extended=0" or if no "_extended" attribute is provided:
c001000 e5655000
where the first dword contains the src_id and the second contains the filesize
2. Three DWORDs - this is used when the query contains "_extended=2"
c001000 e5655000 b5010000
where the first dword contains the src_id, the second contains the filesize, and the third contains what the mpeg data offset in the file. And you get results for only that artist. Note that the artist name has been encoded for use in the URI.
- Version:
- $Revision: 1.12 $ $Date: 2003/05/14 06:24:28 $
| Field Summary | |
protected static java.lang.String |
invalid_target
|
protected static org.apache.commons.logging.Log |
log
logging object |
protected static int |
TARGET_ALBUM
|
protected static int |
TARGET_ARTIST
|
protected static int |
TARGET_GENRE
|
protected static int |
TARGET_TITLE
|
protected static java.lang.String[] |
targets
|
protected jreceiver.common.rpc.Tunes |
tune_rpc
the server which hosts the data |
| Fields inherited from class javax.servlet.http.HttpServlet |
|
| Fields inherited from class javax.servlet.GenericServlet |
|
| Constructor Summary | |
RioHostResults()
|
|
| Method Summary | |
protected void |
binaryResponse(javax.servlet.http.HttpServletResponse resp,
byte[] pattern,
int target,
java.lang.String query,
int rec_offset,
int rec_count)
encode a response suitable retaining minimal playlist data in memory |
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 |
protected void |
textResponse(javax.servlet.http.HttpServletResponse resp,
java.lang.String pattern,
int target,
java.lang.String query,
int rec_offset,
int rec_count)
encode a response suitable for menu display |
| 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 |
tune_rpc
protected jreceiver.common.rpc.Tunes tune_rpc
- the server which hosts the data
targets
protected static final java.lang.String[] targets
TARGET_ARTIST
protected static final int TARGET_ARTIST
- See Also:
- Constant Field Values
TARGET_ALBUM
protected static final int TARGET_ALBUM
- See Also:
- Constant Field Values
TARGET_GENRE
protected static final int TARGET_GENRE
- See Also:
- Constant Field Values
TARGET_TITLE
protected static final int TARGET_TITLE
- See Also:
- Constant Field Values
invalid_target
protected static final java.lang.String invalid_target
- See Also:
- Constant Field Values
log
protected static org.apache.commons.logging.Log log
- logging object
| Constructor Detail |
RioHostResults
public RioHostResults()
| Method Detail |
init
public void init()
throws javax.servlet.ServletException
- Description copied from class:
RioHostBase - Init
- Overrides:
initin classRioHostBase
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:
handleRequestin classRioHostBase
binaryResponse
protected void binaryResponse(javax.servlet.http.HttpServletResponse resp, byte[] pattern, int target, java.lang.String query, int rec_offset, int rec_count) throws javax.servlet.ServletException, java.io.IOException, jreceiver.common.rpc.RpcException
- encode a response suitable retaining minimal playlist data in memory
textResponse
protected void textResponse(javax.servlet.http.HttpServletResponse resp, java.lang.String pattern, int target, java.lang.String query, int rec_offset, int rec_count) throws javax.servlet.ServletException, java.io.IOException, jreceiver.common.rpc.RpcException
- encode a response suitable for menu display
requireMfileId
protected boolean requireMfileId()
- DON'T implicitly fail if no src_id is provided in the * query
- Specified by:
requireMfileIdin classRioHostBase
|
|||||||||
| Home >> All >> jreceiver >> client >> rio >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC