com.aelitis.net.magneturi.impl
Class MagnetURIHandlerImpl
java.lang.Object
com.aelitis.net.magneturi.MagnetURIHandler
com.aelitis.net.magneturi.impl.MagnetURIHandlerImpl
public class MagnetURIHandlerImpl
- extends MagnetURIHandler
- Author:
- parg
Field Summary |
protected static java.lang.String |
NL
|
Method Summary |
void |
addInfo(java.lang.String name,
int info)
|
void |
addListener(MagnetURIHandlerListener l)
|
protected java.lang.String |
getJS(java.lang.String s)
|
protected java.lang.String |
getJSS(java.lang.String s)
|
protected java.lang.String |
getMessageText(java.lang.String resource)
|
protected java.lang.String |
getMessageText(java.lang.String resource,
java.lang.String param)
|
int |
getPort()
|
static MagnetURIHandler |
getSingleton()
|
static void |
main(java.lang.String[] args)
|
protected boolean |
process(java.lang.String get,
java.io.BufferedReader is,
java.io.OutputStream os)
|
void |
process(java.lang.String get,
java.io.InputStream is,
java.io.OutputStream os)
|
java.net.URL |
registerResource(MagnetURIHandler.ResourceProvider provider)
|
void |
removeListener(MagnetURIHandlerListener l)
|
protected void |
writeNotFound(java.io.OutputStream os)
|
protected void |
writeReply(java.io.OutputStream os,
java.lang.String content_type,
byte[] content)
|
protected void |
writeReply(java.io.OutputStream os,
java.lang.String content_type,
java.lang.String content)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NL
protected static final java.lang.String NL
- See Also:
- Constant Field Values
MagnetURIHandlerImpl
protected MagnetURIHandlerImpl()
getSingleton
public static MagnetURIHandler getSingleton()
process
public void process(java.lang.String get,
java.io.InputStream is,
java.io.OutputStream os)
throws java.io.IOException
- Specified by:
process
in class MagnetURIHandler
- Throws:
java.io.IOException
process
protected boolean process(java.lang.String get,
java.io.BufferedReader is,
java.io.OutputStream os)
throws java.io.IOException
- Throws:
java.io.IOException
getMessageText
protected java.lang.String getMessageText(java.lang.String resource)
getMessageText
protected java.lang.String getMessageText(java.lang.String resource,
java.lang.String param)
getJS
protected java.lang.String getJS(java.lang.String s)
getJSS
protected java.lang.String getJSS(java.lang.String s)
writeReply
protected void writeReply(java.io.OutputStream os,
java.lang.String content_type,
java.lang.String content)
throws java.io.IOException
- Throws:
java.io.IOException
writeReply
protected void writeReply(java.io.OutputStream os,
java.lang.String content_type,
byte[] content)
throws java.io.IOException
- Throws:
java.io.IOException
writeNotFound
protected void writeNotFound(java.io.OutputStream os)
throws java.io.IOException
- Throws:
java.io.IOException
getPort
public int getPort()
- Specified by:
getPort
in class MagnetURIHandler
addInfo
public void addInfo(java.lang.String name,
int info)
- Specified by:
addInfo
in class MagnetURIHandler
addListener
public void addListener(MagnetURIHandlerListener l)
- Specified by:
addListener
in class MagnetURIHandler
removeListener
public void removeListener(MagnetURIHandlerListener l)
- Specified by:
removeListener
in class MagnetURIHandler
main
public static void main(java.lang.String[] args)
registerResource
public java.net.URL registerResource(MagnetURIHandler.ResourceProvider provider)
- Specified by:
registerResource
in class MagnetURIHandler