se.datadosen.jalbum
Class ShareBean

java.lang.Object
  extended by se.datadosen.net.JettyHttpServer
      extended by se.datadosen.jalbum.ShareBean
All Implemented Interfaces:
java.util.EventListener, PortMappingListener

public class ShareBean
extends JettyHttpServer
implements PortMappingListener


Field Summary
static java.lang.String CONSOLE_LOGGING
           
static java.lang.String FILE_LOGGING
           
static java.lang.String NO_LOGGING
           
 
Fields inherited from class se.datadosen.net.JettyHttpServer
listener, PING_SERVLET_URI, server
 
Constructor Summary
ShareBean()
           
 
Method Summary
 void addStatusListener(StatusListener l)
          Event dispatching code
 boolean albumAccessTest()
           
 void ensurePortMapping()
           
protected  void fireStatusChanged(java.lang.String msg)
           
 java.lang.String getExternalAddress()
           
 java.lang.String getHostName()
           
 java.lang.String getLogDateFormat()
           
 java.lang.String getLogFileName()
           
 java.lang.String getLogType()
           
 boolean isAutoStart()
           
 boolean isDoPortMapping()
           
 void loadSettings()
           
 void removeStatusListener(StatusListener l)
           
 void saveSettings()
           
 void setAutoStart(boolean autoStart)
           
 void setDoPortMapping(boolean doPortMapping)
           
 void setHostName(java.lang.String hostName)
           
 void setLogDateFormat(java.lang.String logDateFormat)
           
 void setLogFileName(java.lang.String logFileName)
           
 void setLogger()
           
 void setLogType(java.lang.String logType)
           
 void setRequestLog(org.mortbay.http.RequestLog logger)
           
 void start()
          start
 void statusChanged(java.lang.String msg)
          statusChanged
 void stop()
          stop
 
Methods inherited from class se.datadosen.net.JettyHttpServer
getPort, getShares, isRunning, setPort, setShares
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_LOGGING

public static final java.lang.String NO_LOGGING
See Also:
Constant Field Values

CONSOLE_LOGGING

public static final java.lang.String CONSOLE_LOGGING
See Also:
Constant Field Values

FILE_LOGGING

public static final java.lang.String FILE_LOGGING
See Also:
Constant Field Values
Constructor Detail

ShareBean

public ShareBean()
Method Detail

getLogType

public java.lang.String getLogType()

setLogType

public void setLogType(java.lang.String logType)

getLogFileName

public java.lang.String getLogFileName()

setLogFileName

public void setLogFileName(java.lang.String logFileName)

getLogDateFormat

public java.lang.String getLogDateFormat()

setLogDateFormat

public void setLogDateFormat(java.lang.String logDateFormat)

setLogger

public void setLogger()

setRequestLog

public void setRequestLog(org.mortbay.http.RequestLog logger)

isAutoStart

public boolean isAutoStart()

setAutoStart

public void setAutoStart(boolean autoStart)

isDoPortMapping

public boolean isDoPortMapping()

setDoPortMapping

public void setDoPortMapping(boolean doPortMapping)

start

public void start()
           throws java.lang.Exception
Description copied from class: JettyHttpServer
start

Overrides:
start in class JettyHttpServer
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.InterruptedException
Description copied from class: JettyHttpServer
stop

Overrides:
stop in class JettyHttpServer
Throws:
java.lang.InterruptedException

ensurePortMapping

public void ensurePortMapping()
                       throws net.sbbi.upnp.messages.UPNPResponseException,
                              java.io.IOException
Throws:
net.sbbi.upnp.messages.UPNPResponseException
java.io.IOException

getExternalAddress

public java.lang.String getExternalAddress()
                                    throws net.sbbi.upnp.messages.UPNPResponseException,
                                           java.io.IOException
Throws:
net.sbbi.upnp.messages.UPNPResponseException
java.io.IOException

getHostName

public java.lang.String getHostName()

setHostName

public void setHostName(java.lang.String hostName)

albumAccessTest

public boolean albumAccessTest()

saveSettings

public void saveSettings()
                  throws java.io.IOException
Throws:
java.io.IOException

loadSettings

public void loadSettings()
                  throws java.io.IOException,
                         ElementException
Throws:
java.io.IOException
ElementException

addStatusListener

public void addStatusListener(StatusListener l)
Event dispatching code


removeStatusListener

public void removeStatusListener(StatusListener l)

fireStatusChanged

protected void fireStatusChanged(java.lang.String msg)

statusChanged

public void statusChanged(java.lang.String msg)
statusChanged

Specified by:
statusChanged in interface PortMappingListener
Parameters:
msg - String