jview
Class JFtpWebcam

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jview.AbstractDisplayable
                  extended by jview.JWebcam
                      extended by jview.JDaycam
                          extended by jview.JFtpWebcam
All Implemented Interfaces:
Cloneable, Displayable, DisplayChronology, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class JFtpWebcam
extends JDaycam

FTP access is possible in standard URL-fashion only if the FTP-server does not require passive mode, than download can commence using an url like

   URL ftp = new URL("ftp://anonymus:whatever@ftp.site/path/image.jpg;type=i
   
If passive mode is required, a more complicated download is needed using an FtpClient. This class is based on the Jakarta ftp client


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String ANONYMOUS
          Anonymous user.
private static boolean DEFPASSIVE
          Default is passive.
static String KEY_PASSIVE
          Use passive mode.
private static String PASSWORD
          Password to send as anonymous.
 
Fields inherited from class jview.JDaycam
KEY_INVERSE, KEY_SITE, KEY_SOLARLIGHT
 
Fields inherited from class jview.JWebcam
KEY_CLIPRAW, KEY_DATECOLOR, KEY_DATEFONT, KEY_DATEFORMAT, KEY_DATEHORJUST, KEY_DATEPOS, KEY_DATEVERTJUST, KEY_HOST, KEY_PASSPHRASE, KEY_PATH, KEY_PROTOCOL, KEY_SHOWDATE, KEY_TIMEMETHOD, KEY_UPDATE
 
Fields inherited from class jview.AbstractDisplayable
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
JFtpWebcam(Map prop)
          Constructs a new webcam canvas.
 
Method Summary
protected  BufferedImage getWebcamImage(URL ftp)
          We connect to an ftp-server.
 
Methods inherited from class jview.JDaycam
canDeliver, init
 
Methods inherited from class jview.JWebcam
getAuthentication, getDownloadUrl, getRefreshInterval, getRepresentation, getRepresentationAt
 
Methods inherited from class jview.AbstractDisplayable
getComponentName, getIcon, getIcon
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jview.Displayable
getIcon
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_PASSIVE

public static final String KEY_PASSIVE
Use passive mode.

See Also:
Constant Field Values

DEFPASSIVE

private static final boolean DEFPASSIVE
Default is passive.

See Also:
Constant Field Values

ANONYMOUS

private static final String ANONYMOUS
Anonymous user.

See Also:
Constant Field Values

PASSWORD

private static final String PASSWORD
Password to send as anonymous.

See Also:
Constant Field Values
Constructor Detail

JFtpWebcam

public JFtpWebcam(Map prop)
Constructs a new webcam canvas.

Method Detail

getWebcamImage

protected BufferedImage getWebcamImage(URL ftp)
                                throws IOException
We connect to an ftp-server. The url contains the necessary information for the ftp client.

Overrides:
getWebcamImage in class JWebcam
Throws:
IOException