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 java.lang.String NL
           
 
Constructor Summary
protected MagnetURIHandlerImpl()
           
 
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
 

Field Detail

NL

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

MagnetURIHandlerImpl

protected MagnetURIHandlerImpl()
Method Detail

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