com.aelitis.net.magneturi.impl
Class MagnetURIHandlerImpl

java.lang.Object
  extended by com.aelitis.net.magneturi.MagnetURIHandler
      extended by com.aelitis.net.magneturi.impl.MagnetURIHandlerImpl

public class MagnetURIHandlerImpl
extends MagnetURIHandler

Author:
parg

Nested Class Summary
 
Nested classes/interfaces inherited from class com.aelitis.net.magneturi.MagnetURIHandler
MagnetURIHandler.ResourceProvider
 
Field Summary
protected static String NL
           
 
Constructor Summary
protected MagnetURIHandlerImpl()
           
 
Method Summary
 void addInfo(String name, int info)
           
 void addListener(MagnetURIHandlerListener l)
           
protected  String getJS(String s)
           
protected  String getJSS(String s)
           
protected  String getMessageText(String resource)
           
protected  String getMessageText(String resource, String param)
           
 int getPort()
           
static MagnetURIHandler getSingleton()
           
static void main(String[] args)
           
protected  boolean process(String get, BufferedReader is, OutputStream os)
           
 void process(String get, InputStream is, OutputStream os)
           
 URL registerResource(MagnetURIHandler.ResourceProvider provider)
           
 void removeListener(MagnetURIHandlerListener l)
           
protected  void writeNotFound(OutputStream os)
           
protected  void writeReply(OutputStream os, String content_type, byte[] content)
           
protected  void writeReply(OutputStream os, String content_type, String content)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NL

protected static final String NL
See Also:
Constant Field Values
Constructor Detail

MagnetURIHandlerImpl

protected MagnetURIHandlerImpl()
Method Detail

getSingleton

public static MagnetURIHandler getSingleton()

process

public void process(String get,
                    InputStream is,
                    OutputStream os)
             throws IOException
Specified by:
process in class MagnetURIHandler
Throws:
IOException

process

protected boolean process(String get,
                          BufferedReader is,
                          OutputStream os)
                   throws IOException
Throws:
IOException

getMessageText

protected String getMessageText(String resource)

getMessageText

protected String getMessageText(String resource,
                                String param)

getJS

protected String getJS(String s)

getJSS

protected String getJSS(String s)

writeReply

protected void writeReply(OutputStream os,
                          String content_type,
                          String content)
                   throws IOException
Throws:
IOException

writeReply

protected void writeReply(OutputStream os,
                          String content_type,
                          byte[] content)
                   throws IOException
Throws:
IOException

writeNotFound

protected void writeNotFound(OutputStream os)
                      throws IOException
Throws:
IOException

getPort

public int getPort()
Specified by:
getPort in class MagnetURIHandler

addInfo

public void addInfo(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(String[] args)

registerResource

public URL registerResource(MagnetURIHandler.ResourceProvider provider)
Specified by:
registerResource in class MagnetURIHandler