I've noticed I can create a custom Ftplet and retrieve the
FileSystemManager from there, and pass it a reference within init() for
example.
However since both FileSystemManager and my Ftplet is defined in the
properties file and created by FtpServer, I'm still not sure if I can
pass a reference from "outside" FtpServer into my FileSystemManager.
I'm beginning to think that what I'm trying to do is perhaps not within
the most common uses for the FtpServer, and that I might have to enable
a protocol between the FtpServer and the application.
Best Regards,
Joakim Back
Joakim Back skrev:
Hello again,
I hope I am not abusing the mailing list by this further question;
I have now set up my own flavor of FileSystemManager and
FileSystemView. The view keeps track of the current path of the user,
and passes requests regarding FileObjects to an instance of (my own
interface) FileObjectService.
to clarify, FileObjectService is a new interface containing just part
of the FileSystemView interface:
public FileObject getRootDirectory() throws FtpException;
public FileObject getFileObject(String path) throws FtpException;
public FileObject[] listFiles(String path) throws FtpException;
public void dispose();
This is to separate the navigation with file handling, and limit the
bridge to the rest of the application to implementing
FileObjectService (and FileObject).
However, FileObjectService needs a reference to a service within the
application. During this mock up, I have created the mock-application
in the FileSystemManager, and passed it through FileSystemView to the
FileObjectService.
Instead, I would like to pass a reference to the application-service
into FileSystemManager upon creating the FTPServer. How would this be
possible?
Best regards,
Joakim Back