02/28/2005
 

Package com.vignette.portal.rsm.file

RSM implementation to retrieve content from the file system.

See:
          Package Summary

Class Summary
FileRemoteRequest Models a request to the file system for content.
FileRemoteResponse Models a response from a request to the file system for content.
FileRemoteSession Models a session for retrieving content from the filesystem.
 

Package com.vignette.portal.rsm.file Description

RSM implementation to retrieve content from the file system.

Although the file system does not represent a true protocol, this form of content retrieval is frequently used and fits well into the request-response paradigm.

Usage

Client code will start use of the API by creating a session. The RemoteSessionFactory object contains a factory method (createRemoteSession()) that creates a session for a given protocol. If the protocol is unknown or unsupported, an UnsupportedProtocolException is thrown.


try {
	RemoteSession session = RemoteSessionFactory.createRemoteSession("file");
} catch (UnsupportedProtocolException e) {}

This creates a representation in your code of a session on a remote server. The session object can then be cast to the appropriate protocol-specific session implementation to set specific session information:

if (session instanceof FileRemoteSession) {
	FileRemoteSession file_session = (FileRemoteSession)session;
}

The session is then used to create and perform the request:

URL url = new URL("file:///usr/local/myfile.txt");
FileRemoteRequest file_request = (FileRemoteRequest)file_session.createRequest(url);
FileRemoteResponse file_response = (FileRemoteResponse)file_request.performRequest(5000);

The FileRemoteResponse object is then used to retrieve the content in one of three methods:

Since:
7.0
See Also:
FileData, com.vignette.portal.rsm

02/28/2005
 

Copyright and Trademark Notices