/**
* Interface for objects that want to be notified on certain FCP events.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public interface FcpListener extends EventListener {
/**
* Notifies a listener that a “NodeHello” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param nodeHello
/**
* Notifies a listener that a “CloseConnectionDuplicateClientName” message
* was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param closeConnectionDuplicateClientName
/**
* Notifies a listener that a “SSKKeypair” message was received.
- *
+ *
* @param fcpConnection
* The connection that received themessage
* @param sskKeypair
/**
* Notifies a listener that a “Peer” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param peer
/**
* Notifies a listener that an “EndListPeers” message was received.
- *
+ *
* @param fcpConnection
* The connection that recevied the message
* @param endListPeers
/**
* Notifies a listener that a “PeerNote” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param peerNote
/**
* Notifies a listener that an “EndListPeerNotes” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param endListPeerNotes
/**
* Notifies a listener that a “PeerRemoved” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param peerRemoved
/**
* Notifies a listener that a “NodeData” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param nodeData
/**
* Notifies a listener that a “TestDDAReply” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param testDDAReply
/**
* Notifies a listener that a “TestDDAComplete” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param testDDAComplete
/**
* Notifies a listener that a “PersistentGet” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param persistentGet
/**
* Notifies a listener that a “PersistentPut” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param persistentPut
/**
* Notifies a listener that a “EndListPersistentRequests” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param endListPersistentRequests
/**
* Notifies a listener that a “URIGenerated” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param uriGenerated
/**
* Notifies a listener that a “DataFound” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param dataFound
/**
* Notifies a listener that an “AllData” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param allData
/**
* Notifies a listener that a “SimpleProgress” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param simpleProgress
/**
* Notifies a listener that a “StartedCompression” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param startedCompression
/**
* Notifies a listener that a “FinishedCompression” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param finishedCompression
/**
* Notifies a listener that an “UnknownPeerNoteType” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param unknownPeerNoteType
/**
* Notifies a listener that a “UnknownNodeIdentifier” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param unknownNodeIdentifier
/**
* Notifies a listener that a “ConfigData” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param configData
/**
* Notifies a listener that a “GetFailed” message was recevied.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param getFailed
/**
* Notifies a listener that a “PutFailed” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param putFailed
/**
* Notifies a listener that an “IdentifierCollision” message was receied.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param identifierCollision
/**
* Notifies a listener that a “PersistentPutDir” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param persistentPutDir
/**
* Notifies a listener that a “PersistentRequestRemoved” message was
* received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param persistentRequestRemoved
/**
* Notifies a listener that a “SubscribedUSKUpdate” message was received.
- *
+ *
* @param fcpConnection
* The connection that recevied the message
* @param subscribedUSKUpdate
/**
* Notifies a listener that a “PluginInfo” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param pluginInfo
/**
* Notifies a listener that an “FCPPluginReply“ message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param fcpPluginReply
/**
* Notifies a listener that a “PersistentRequestModified” message was
* received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param persistentRequestModified
/**
* Notifies a listener that a “PutSuccessful” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param putSuccessful
/**
* Notifies a listener that a “PutFetchable” message was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param putFetchable
/**
* Notifies a listener that a “ProtocolError” was received.
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param protocolError
* Notifies a listener that a message has been received. This method is only
* called if {@link FcpConnection#handleMessage(FcpMessage)} does not
* recognize the message. Should that ever happen, please file a bug report!
- *
+ *
* @param fcpConnection
* The connection that received the message
* @param fcpMessage
* Notifies a listener that a connection was closed. A closed connection can
* be reestablished by calling {@link FcpConnection#connect()} on the same
* object again.
- *
+ *
* @param fcpConnection
* The connection that was closed.
* @param throwable
* A “PersistentPutDir” is the response to a {@link ClientPutDiskDir} message.
* It is also sent as a possible response to a {@link ListPersistentRequests}
* message.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public class PersistentPutDir extends BaseMessage {
/**
* Creates a new “PersistentPutDir” message that wraps the received message.
- *
+ *
* @param receivedMessage
* The received message
*/
/**
* Returns the identifier of the request.
- *
+ *
* @return The identifier of the request
*/
public String getIdentifier() {
/**
* Returns the URI of the request.
- *
+ *
* @return The URI of the request
*/
public String getURI() {
/**
* Returns the verbosity of the request.
- *
+ *
* @return The verbosity of the request
*/
public Verbosity getVerbosity() {
/**
* Returns the priority of the request.
- *
+ *
* @return The priority of the request
*/
public Priority getPriority() {
/**
* Returns whether the request is on the global queue.
- *
+ *
* @return <code>true</code> if the request is on the global queue,
* <code>false</code> if it is on the client-local queue
*/
/**
* Returns the maximum number of retries for failed blocks.
- *
+ *
* @return The maximum number of retries, or <code>-1</code> for endless
* retries, or <code>-2</code> if the number could not be parsed
*/
/**
* Returns the number of files in the request.
- *
+ *
* @return The number of files in the request
*/
public int getFileCount() {
/**
* Returns the name of the file at the given index. The index is counted
* from <code>0</code>.
- *
+ *
* @param fileIndex
* The index of the file
* @return The name of the file at the given index
/**
* Returns the length of the file at the given index. The index is counted
* from <code>0</code>.
- *
+ *
* @param fileIndex
* The index of the file
* @return The length of the file at the given index
/**
* Returns the upload source of the file at the given index. The index is
* counted from <code>0</code>.
- *
+ *
* @param fileIndex
* The index of the file
* @return The upload source of the file at the given index
/**
* Returns the content type of the file at the given index. The index is
* counted from <code>0</code>.
- *
+ *
* @param fileIndex
* The index of the file
* @return The content type of the file at the given index
* Returns the filename of the file at the given index. This value is only
* returned if {@link #getFileUploadFrom(int)} is returning
* {@link UploadFrom#disk}. The index is counted from <code>0</code>.
- *
+ *
* @param fileIndex
* The index of the file
* @return The filename of the file at the given index