/**
* The “AllData” message carries the payload of a successful {@link ClientGet}
- * request. You will only received this message if the {@link ClientGet} request
- * was started with a return type of {@link ReturnType#direct}. If you get this
- * message and decide that the data is for you, call
+ * request. You will only received this message if the {@link ClientGet}
+ * request was started with a return type of {@link ReturnType#direct}. If you
+ * get this message and decide that the data is for you, call
* {@link #getPayloadInputStream()} to get the data. If an AllData message
* passes through all registered {@link FcpListener}s without the payload being
* consumed, the payload is discarded!
}
/**
- * Sets the maximum size of the file to retrieve. If the file is larger than
- * this size the request will fail!
+ * Sets the maximum size of the file to retrieve. If the file is larger
+ * than this size the request will fail!
*
* @param maxSize
* The maximum size of the file to retrieve
}
/**
- * Sets the name for the temporary file. You should only call this method if
- * your return type is {@link ReturnType#disk}!
+ * Sets the name for the temporary file. You should only call this method
+ * if your return type is {@link ReturnType#disk}!
*
* @param tempFilename
* The name of the temporary file
* test your direct-disk access (see {@link TestDDARequest},
* {@link TestDDAReply}, {@link TestDDAResponse}, {@link TestDDAComplete})
* before using this option! If <code>uploadFrom</code> is
- * {@link UploadFrom#redirect}, use {@link #setTargetURI(String)} to set the
- * target URI of the redirect.
+ * {@link UploadFrom#redirect}, use {@link #setTargetURI(String)} to set
+ * the target URI of the redirect.
*
* @param uri
* The URI to insert to
}
/**
- * Determines whether the node should really insert the data or generate the
- * final CHK only.
+ * Determines whether the node should really insert the data or generate
+ * the final CHK only.
*
* @param getCHKOnly
* <code>true</code> to generate the final CHK only,
* Sets whether an insert request should be forked when it is cached.
*
* @param forkOnCacheable
- * {@code true} to fork the insert when it is cached, {@code
- * false} otherwise
+ * {@code true} to fork the insert when it is cached,
+ * {@code false} otherwise
*/
public void setForkOnCacheable(boolean forkOnCacheable) {
setField("ForkOnCacheable", String.valueOf(forkOnCacheable));
* already been compressed.
*
* @param dontCompress
- * <code>true</code> to skip compression of the data in the node,
- * <code>false</code> to allow compression
+ * <code>true</code> to skip compression of the data in the
+ * node, <code>false</code> to allow compression
*/
public void setDontCompress(boolean dontCompress) {
setField("DontCompress", String.valueOf(dontCompress));
}
/**
- * Sets an optional client token. This client token is mentioned in progress
- * and other request-related messages and can be used to identify this
- * request.
+ * Sets an optional client token. This client token is mentioned in
+ * progress and other request-related messages and can be used to identify
+ * this request.
*
* @param clientToken
* The client token
* Sets whether an insert request should be forked when it is cached.
*
* @param forkOnCacheable
- * {@code true} to fork the insert when it is cached, {@code
- * false} otherwise
+ * {@code true} to fork the insert when it is cached,
+ * {@code false} otherwise
*/
public void setForkOnCacheable(boolean forkOnCacheable) {
setField("ForkOnCacheable", String.valueOf(forkOnCacheable));
* {@inheritDoc}
* <p>
* Do not call this method to add input streams! The input streams, if any,
- * will be taken directly from the {@link FileEntry}s and the stream you set
- * here will be overridden!
+ * will be taken directly from the {@link FileEntry}s and the stream you
+ * set here will be overridden!
*/
@Override
public void setPayloadInputStream(InputStream payloadInputStream) {
}
/**
- * Determines whether the node should really insert the data or generate the
- * final CHK only.
+ * Determines whether the node should really insert the data or generate
+ * the final CHK only.
*
* @param getCHKOnly
* <code>true</code> to generate the final CHK only,
* Sets whether an insert request should be forked when it is cached.
*
* @param forkOnCacheable
- * {@code true} to fork the insert when it is cached, {@code
- * false} otherwise
+ * {@code true} to fork the insert when it is cached,
+ * {@code false} otherwise
*/
public void setForkOnCacheable(boolean forkOnCacheable) {
setField("ForkOnCacheable", String.valueOf(forkOnCacheable));
* already been compressed.
*
* @param dontCompress
- * <code>true</code> to skip compression of the data in the node,
- * <code>false</code> to allow compression
+ * <code>true</code> to skip compression of the data in the
+ * node, <code>false</code> to allow compression
*/
public void setDontCompress(boolean dontCompress) {
setField("DontCompress", String.valueOf(dontCompress));
}
/**
- * Sets an optional client token. This client token is mentioned in progress
- * and other request-related messages and can be used to identify this
- * request.
+ * Sets an optional client token. This client token is mentioned in
+ * progress and other request-related messages and can be used to identify
+ * this request.
*
* @param clientToken
* The client token
}
/**
- * Sets the name of the default file. The default file is shown when the key
- * is requested with an additional name.
+ * Sets the name of the default file. The default file is shown when the
+ * key is requested with an additional name.
*
* @param defaultName
* The name of the default file
import java.security.interfaces.DSAParams;
/**
- * Container for the DSA group of a peer. A DSA group consists of a base (called
- * “g”), a prime (called “p”) and a subprime (called “q”).
+ * Container for the DSA group of a peer. A DSA group consists of a base
+ * (called “g”), a prime (called “p”) and a subprime (called “q”).
*
* @see DSAParams
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
/**
* A “DataFound” message signals the client that the data requested by a
- * {@link ClientGet} operation has been found. This message does not include the
- * actual data, though.
+ * {@link ClientGet} operation has been found. This message does not include
+ * the actual data, though.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public class EndListPeerNotes extends BaseMessage {
/**
- * Creates a new “EndListPeerNotes” message that wraps the received message.
+ * Creates a new “EndListPeerNotes” message that wraps the received
+ * message.
*
* @param fcpMessage
* The received message
public class EndListPersistentRequests extends BaseMessage {
/**
- * Creates a new “EndListPersistentRequests” message that wraps the received
- * message.
+ * Creates a new “EndListPersistentRequests” message that wraps the
+ * received message.
*
* @param receivedMessage
* The received message
}
/**
- * Sets the identifier of the request. Though this is still optional you are
- * encouraged to include it because the plugin might reply in random order
- * to requests.
+ * Sets the identifier of the request. Though this is still optional you
+ * are encouraged to include it because the plugin might reply in random
+ * order to requests.
*
* @param identifier
* The identifier of the request
/**
* Sets the length of data of the optional payload. If you call this method
- * you also have to call {@link #setPayloadInputStream(java.io.InputStream)}
- * !
+ * you also have to call
+ * {@link #setPayloadInputStream(java.io.InputStream)} !
*
* @param dataLength
* The length of data in the payload input stream
}
/**
- * Closes the connection. If there is no connection to the node, this method
- * does nothing.
+ * Closes the connection. If there is no connection to the node, this
+ * method does nothing.
*/
@Override
public void close() {
* Handles a disconnect from the node.
*
* @param throwable
- * The exception that caused the disconnect, or <code>null</code>
- * if there was no exception
+ * The exception that caused the disconnect, or
+ * <code>null</code> if there was no exception
*/
synchronized void handleDisconnect(Throwable throwable) {
FcpUtils.close(remoteInputStream);
}
/**
- * A wrapper around an {@link InputStream} that only supplies a limit number
- * of bytes from the underlying input stream.
+ * A wrapper around an {@link InputStream} that only supplies a limit
+ * number of bytes from the underlying input stream.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
}
String field = line.substring(0, equalSign);
String value = line.substring(equalSign + 1);
- assert fcpMessage != null : "fcp message is null";
+ assert fcpMessage != null: "fcp message is null";
fcpMessage.setField(field, value);
} catch (IOException ioe1) {
throwable = ioe1;
public void receivedProtocolError(FcpConnection fcpConnection, ProtocolError 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!
+ * 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
public void receivedMessage(FcpConnection fcpConnection, FcpMessage 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.
+ * 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
- * The exception that caused the disconnect, or <code>null</code>
- * if there was no exception
+ * The exception that caused the disconnect, or
+ * <code>null</code> if there was no exception
*/
public void connectionClosed(FcpConnection fcpConnection, Throwable throwable);
}
/**
- * Notifies all listeners that a “FinishedCompression” message was received.
+ * Notifies all listeners that a “FinishedCompression” message was
+ * received.
*
* @see FcpListener#receivedFinishedCompression(FcpConnection,
* FinishedCompression)
}
/**
- * Notifies all listeners that a “SubscribedUSKUpdate” message was received.
+ * Notifies all listeners that a “SubscribedUSKUpdate” message was
+ * received.
*
* @see FcpListener#receivedSubscribedUSKUpdate(FcpConnection,
* SubscribedUSKUpdate)
* Notifies all listeners that the connection to the node was closed.
*
* @param throwable
- * The exception that caused the disconnect, or <code>null</code>
- * if there was no exception
+ * The exception that caused the disconnect, or
+ * <code>null</code> if there was no exception
* @see FcpListener#connectionClosed(FcpConnection, Throwable)
*/
public void fireConnectionClosed(Throwable throwable) {
}
/**
- * Creates a new FCP message with the given name and the given payload input
- * stream. The payload input stream is not read until the message is sent to
- * the node using {@link FcpConnection#sendMessage(FcpMessage)}.
+ * Creates a new FCP message with the given name and the given payload
+ * input stream. The payload input stream is not read until the message is
+ * sent to the node using {@link FcpConnection#sendMessage(FcpMessage)}.
*
* @param name
* The name of the message
*
* @param field
* The name of the field to check for
- * @return <code>true</code> if the message has a field with the given name,
- * <code>false</code> otherwise
+ * @return <code>true</code> if the message has a field with the given
+ * name, <code>false</code> otherwise
*/
public boolean hasField(String field) {
return fields.containsKey(field);
* Writes this message to the given output stream. If the message has a
* payload (i.e. {@link #payloadInputStream} is not <code>null</code>) the
* payload is written to the given output stream after the message as well.
- * That means that this method can only be called once because on the second
- * invocation the payload input stream could not be read (again).
+ * That means that this method can only be called once because on the
+ * second invocation the payload input stream could not be read (again).
*
* @param outputStream
* The output stream to write the message to
}
/**
- * Tries to parse the given string into an int, returning <code>-1</code> if
- * the string can not be parsed.
+ * Tries to parse the given string into an int, returning <code>-1</code>
+ * if the string can not be parsed.
*
* @param value
* The string to parse
}
/**
- * Sets whether the {@link ConfigData} result message shall include the long
- * descriptions.
+ * Sets whether the {@link ConfigData} result message shall include the
+ * long descriptions.
*
* @param withLongDescription
* <code>true</code> to include the long descriptions in the
}
/**
- * Sets whether the {@link ConfigData} result message shall include the data
- * types.
+ * Sets whether the {@link ConfigData} result message shall include the
+ * data types.
*
* @param withDataTypes
* <code>true</code> to include the data types in the result,
}
/**
- * Sets whether the {@link ConfigData} result message shall include the sort
- * order.
+ * Sets whether the {@link ConfigData} result message shall include the
+ * sort order.
*
* @param withSortOrder
* <code>true</code> to include the sort order in the result,
/**
* Returns the code of the error.
*
- * @return The code of the error, or <code>-1</code> if the error code could
- * not be parsed
+ * @return The code of the error, or <code>-1</code> if the error code
+ * could not be parsed
*/
public int getCode() {
return FcpUtils.safeParseInt(getField("Code"));
}
/**
- * Returns whether the expected values (see {@link #getExpectedDataLength()}
- * and {@link #getExpectedMetadataContentType()}) have already been
- * finalized and can be trusted. If the values have not been finalized that
- * can change over time.
+ * Returns whether the expected values (see
+ * {@link #getExpectedDataLength()} and
+ * {@link #getExpectedMetadataContentType()}) have already been finalized
+ * and can be trusted. If the values have not been finalized that can
+ * change over time.
*
* @return <code>true</code> if the expected values have already been
* finalized, <code>false</code> otherwise
}
/**
- * Returns whether the request failed fatally. If a request fails fatally it
- * can never complete, even with inifinite retries.
+ * Returns whether the request failed fatally. If a request fails fatally
+ * it can never complete, even with inifinite retries.
*
* @return <code>true</code> if the request failed fatally,
* <code>false</code> otherwise
public class GetNode extends FcpMessage {
/**
- * Creates a “GetNode” command that returns the darknet noderef of the node.
+ * Creates a “GetNode” command that returns the darknet noderef of the
+ * node.
*/
public GetNode() {
this(null, null, null);
}
/**
- * Creates a “GetNode” command that returns the request noderef of the node,
- * including private and volatile data, if requested. If any of the Boolean
- * parameters are <code>null</code> the parameter is ignored and the node’s
- * default value is used.
+ * Creates a “GetNode” command that returns the request noderef of the
+ * node, including private and volatile data, if requested. If any of the
+ * Boolean parameters are <code>null</code> the parameter is ignored and
+ * the node’s default value is used.
*
* @param giveOpennetRef
* <code>true</code> to request the opennet noderef,
/**
* The “GetRequestStatus” message is used request status information about a
- * running request. It is also the only way to trigger a download of a persisted
- * completed {@link ClientGet} with a return type of {@link ReturnType#direct}.
+ * running request. It is also the only way to trigger a download of a
+ * persisted completed {@link ClientGet} with a return type of
+ * {@link ReturnType#direct}.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
/**
* Creates a new “ListPeer” request that returns information about the node
- * specified by <code>nodeIdentifier</code>. <code>nodeIdentifier</code> can
- * be of several formats: The node’s name, its identity, or its IP address
- * and port (connection with a ‘:’).
+ * specified by <code>nodeIdentifier</code>. <code>nodeIdentifier</code>
+ * can be of several formats: The node’s name, its identity, or its IP
+ * address and port (connection with a ‘:’).
*
* @param nodeIdentifier
* The identifier of the node to get details about
}
/**
- * Creates a new “ListPeers” request that includes wanted data of the peers.
+ * Creates a new “ListPeers” request that includes wanted data of the
+ * peers.
*
* @param identifier
* The identifier of the request
* If <code>true</code> metadata of the peers is included in the
* reply
* @param withVolatile
- * if <code>true</code> volatile data of the peers is included in
- * the reply
+ * if <code>true</code> volatile data of the peers is included
+ * in the reply
*/
public ListPeers(String identifier, boolean withMetadata, boolean withVolatile) {
super("ListPeers");
public class ModifyPeer extends FcpMessage {
/**
- * Creates a new “ModifyPeer” request. All Boolean parameters may be null to
- * not influence the current setting.
+ * Creates a new “ModifyPeer” request. All Boolean parameters may be null
+ * to not influence the current setting.
*
* @param nodeIdentifier
- * The identifier of the node, i.e. name, identity, or IP address
- * and port
+ * The identifier of the node, i.e. name, identity, or IP
+ * address and port
* @param allowLocalAddresses
* Whether to allow local addresses from this node
* @param disabled
*
* @see PeerNote
* @param nodeIdentifier
- * The identifier of the node, i.e. name, identity, or IP address
- * and port
+ * The identifier of the node, i.e. name, identity, or IP
+ * address and port
* @param noteText
* The base64-encoded text
* @param peerNoteType
}
/**
- * Returns one of the volatile fields from the message. The given field name
- * is prepended with “volatile.” so if you want to get the value of the
- * field with the name “volatile.freeJavaMemory” you only need to specify
- * “freeJavaMemory”.
+ * Returns one of the volatile fields from the message. The given field
+ * name is prepended with “volatile.” so if you want to get the value of
+ * the field with the name “volatile.freeJavaMemory” you only need to
+ * specify “freeJavaMemory”.
*
* @param field
* The name of the field
}
/**
- * Returns the build of the node. This may not be a number but also a string
- * like “@custom@” in case you built the node yourself.
+ * Returns the build of the node. This may not be a number but also a
+ * string like “@custom@” in case you built the node yourself.
*
* @return The build of the node
*/
}
/**
- * Returns the build number of the node. This may not be a number but also a
- * string like “@custom@” in case you built the node yourself.
+ * Returns the build number of the node. This may not be a number but also
+ * a string like “@custom@” in case you built the node yourself.
*
* @return The build number of the node, or <code>-1</code> if the build
* number could not be determined
/**
* Returns the build number of the external library file.
*
- * @return The build number of the external library file, or <code>-1</code>
- * if the build number could not be determined
+ * @return The build number of the external library file, or
+ * <code>-1</code> if the build number could not be determined
*/
public int getExtBuildNumber() {
return FcpUtils.safeParseInt(getExtBuild());
}
/**
- * Returns the name of the node. If the node is an opennet peer, it will not
- * have a name!
+ * Returns the name of the node. If the node is an opennet peer, it will
+ * not have a name!
*
* @return The name of the node, or <code>null</code> if the node is an
* opennet peer
}
/**
- * Returns one of the volatile fields from the message. The given field name
- * is prepended with “volatile.” so if you want to get the value of the
- * field with the name “volatile.status” you only need to specify “status”.
+ * Returns one of the volatile fields from the message. The given field
+ * name is prepended with “volatile.” so if you want to get the value of
+ * the field with the name “volatile.status” you only need to specify
+ * “status”.
*
* @param field
* The name of the field
}
/**
- * Returns one of the metadata fields from the message. The given field name
- * is prepended with “metadata.” so if you want to get the value of the
- * field with the name “metadata.timeLastRoutable” you only need to specify
- * “timeLastRoutable”.
+ * Returns one of the metadata fields from the message. The given field
+ * name is prepended with “metadata.” so if you want to get the value of
+ * the field with the name “metadata.timeLastRoutable” you only need to
+ * specify “timeLastRoutable”.
*
* @param field
* The name of the field
/**
* Returns the type of the peer note.
*
- * @return The type of the peer note, or <code>-1</code> if the type can not
- * be parsed
+ * @return The type of the peer note, or <code>-1</code> if the type can
+ * not be parsed
*/
public int getPeerNoteType() {
return FcpUtils.safeParseInt(getField("PeerNoteType"));
/**
* The “PersistentGet” message is sent to the client to inform it about a
- * persistent download, either in the client-local queue or in the global queue.
+ * persistent download, either in the client-local queue or in the global
+ * queue.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
/**
* Returns the persistence of the request.
*
- * @return The persistence of the request, or {@link Persistence#unknown} if
- * the persistence could not be parsed
+ * @return The persistence of the request, or {@link Persistence#unknown}
+ * if the persistence could not be parsed
*/
public Persistence getPersistence() {
try {
/**
* Returns the maximum number of retries for a failed block.
*
- * @return The maximum number of retries for a failed block, <code>-1</code>
- * for endless retries, <code>-2</code> if the number could not be
- * parsed
+ * @return The maximum number of retries for a failed block,
+ * <code>-1</code> for endless retries, <code>-2</code> if the
+ * number could not be parsed
*/
public int getMaxRetries() {
return FcpUtils.safeParseInt(getField("MaxRetries"), -2);
public class PersistentPutDir extends BaseMessage implements Identifiable {
/**
- * Creates a new “PersistentPutDir” message that wraps the received message.
+ * Creates a new “PersistentPutDir” message that wraps the received
+ * message.
*
* @param receivedMessage
* The received message
public class PersistentRequestModified extends BaseMessage implements Identifiable {
/**
- * Creates a new “PersistentRequestModified” message that wraps the received
- * message.
+ * Creates a new “PersistentRequestModified” message that wraps the
+ * received message.
*
* @param receivedMessage
* The received message
* Returns whether the request was removed from the global queue.
*
* @return <code>true</code> if the request was removed from the global
- * queue, <code>false</code> if it was removed from the client-local
- * queue
+ * queue, <code>false</code> if it was removed from the
+ * client-local queue
*/
public boolean isGlobal() {
return Boolean.valueOf(getField("Global"));
/**
* Returns the error code.
*
- * @return The error code, or <code>-1</code> if the error code could not be
- * parsed
+ * @return The error code, or <code>-1</code> if the error code could not
+ * be parsed
*/
public int getCode() {
return FcpUtils.safeParseInt(getField("Code"));
/**
* Returns the code of the error.
*
- * @return The code of the error, or <code>-1</code> if the error code could
- * not be parsed
+ * @return The code of the error, or <code>-1</code> if the error code
+ * could not be parsed
*/
public int getCode() {
return FcpUtils.safeParseInt(getField("Code"));
}
/**
- * Returns whether the request failed fatally. If a request fails fatally it
- * can never complete, even with inifinite retries.
+ * Returns whether the request failed fatally. If a request fails fatally
+ * it can never complete, even with inifinite retries.
*
* @return <code>true</code> if the request failed fatally,
* <code>false</code> otherwise
/**
* Returns whether the bookmark has an active link image.
*
- * @return {@code true} if the bookmark has an active link image, {@code
- * false} otherwise
+ * @return {@code true} if the bookmark has an active link image,
+ * {@code false} otherwise
*/
public boolean hasActiveLink() {
return Boolean.parseBoolean(getField("HasAnActiveLink"));
}
/**
- * Returns the description of the bookmark. Note that the description may be
- * {@code null} and if it is not, it is base64-encoded!
+ * Returns the description of the bookmark. Note that the description may
+ * be {@code null} and if it is not, it is base64-encoded!
*
* @return The bookmark’s description, or {@code null} if the bookmark has
* no description
* @param description
* The description of the bookmark (may be {@code null})
* @param hasActiveLink
- * {@code true} if the bookmark has an activelink image, {@code
- * false} otherwise
+ * {@code true} if the bookmark has an activelink image,
+ * {@code false} otherwise
*/
public SendBookmarkFeed(String identifier, String nodeIdentifier, String name, String uri, String description, boolean hasActiveLink) {
super("SendBookmarkFeed", identifier, nodeIdentifier);
package net.pterodactylus.fcp;
/**
- * A “SubscribedUSKUpdate” message is sent each time a new edition of a USK that
- * was previously subscribed to with {@link SubscribeUSK} was found. Note that
- * if the new edition that was found is several editions ahead of the currently
- * last known edition, you will received a SubscribedUSKUpdate for each edition
- * inbetween as welL!
+ * A “SubscribedUSKUpdate” message is sent each time a new edition of a USK
+ * that was previously subscribed to with {@link SubscribeUSK} was found. Note
+ * that if the new edition that was found is several editions ahead of the
+ * currently last known edition, you will received a SubscribedUSKUpdate for
+ * each edition inbetween as welL!
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
* The “TestDDAReply” is sent as a response to {@link TestDDARequest}. If you
* specified that you wanted to read files from that directory
* {@link #getReadFilename()} will give you a filename. Similarly, if you
- * specified that you want to write in the directory {@link #getWriteFilename()}
- * will give you a filename to write {@link #getContentToWrite()} to.
+ * specified that you want to write in the directory
+ * {@link #getWriteFilename()} will give you a filename to write
+ * {@link #getContentToWrite()} to.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
* @param directory
* The directory you want to access files in
* @param wantReadDirectory
- * <code>true</code> if you want to read files from the directory
+ * <code>true</code> if you want to read files from the
+ * directory
* @param wantWriteDirectory
* <code>true</code> if you want to write files to the directory
*/
/**
* A “TestDDAResponse” is sent to let the node know that either created a file
* with the content from {@link TestDDAReply#getContentToWrite()} or that you
- * read the content of the file given by {@link TestDDAReply#getReadFilename()}.
+ * read the content of the file given by {@link TestDDAReply#getReadFilename()}
+ * .
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public class TestDDAResponse extends FcpMessage {
/**
- * Creates a new “TestDDAResponse” message that signals that you created the
- * file given by {@link TestDDAReply#getWriteFilename()} and wrote the
+ * Creates a new “TestDDAResponse” message that signals that you created
+ * the file given by {@link TestDDAReply#getWriteFilename()} and wrote the
* contents given by {@link TestDDAReply#getContentToWrite()} to it.
*
* @param directory
}
/**
- * Creates a new “TestDDAResponse” message that signals that you created the
- * file given by {@link TestDDAReply#getWriteFilename()} with the contents
- * given by {@link TestDDAReply#getContentToWrite()} to it (when you
- * specified that you want to write to the directory) and/or that you read
- * the file given by {@link TestDDAReply#getReadFilename()} (when you
+ * Creates a new “TestDDAResponse” message that signals that you created
+ * the file given by {@link TestDDAReply#getWriteFilename()} with the
+ * contents given by {@link TestDDAReply#getContentToWrite()} to it (when
+ * you specified that you want to write to the directory) and/or that you
+ * read the file given by {@link TestDDAReply#getReadFilename()} (when you
* specified you wanted to read the directory).
*
* @param directory
package net.pterodactylus.fcp;
/**
- * The “URIGenerated” message signals the client that an URI was generated for a
- * {@link ClientPut} (or {@link ClientPutDiskDir} or {@link ClientPutComplexDir}
- * ) request.
+ * The “URIGenerated” message signals the client that an URI was generated for
+ * a {@link ClientPut} (or {@link ClientPutDiskDir} or
+ * {@link ClientPutComplexDir} ) request.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
}
/**
- * Returns whether the request that generated the URI is on the global queue
- * or on the client-local queue.
+ * Returns whether the request that generated the URI is on the global
+ * queue or on the client-local queue.
*
* @return <code>true</code> if the request is on the global queue,
* <code>false</code> if it is on the client-local queue
/**
* Convenicence class for verbosity handling. This might come in handy with the
- * {@link ClientPut} and {@link ClientGet} requests. The verbosity is a bit-mask
- * that can be composed of several bits. {@link #PROGRESS} and
+ * {@link ClientPut} and {@link ClientGet} requests. The verbosity is a
+ * bit-mask that can be composed of several bits. {@link #PROGRESS} and
* {@link #COMPRESSION} are single bits in that mask and can be combined into a
* new verbosity using {@link #add(Verbosity)}.
*
*
* @param s
* The string to parse
- * @return The parsed verbosity, or {@link #NONE} if the string could not be
- * parsed
+ * @return The parsed verbosity, or {@link #NONE} if the string could not
+ * be parsed
*/
public static Verbosity valueOf(String s) {
try {
/**
* Creates a new Version from the given string. The string consists of the
- * four required fields node name, tree version, protocol version, and build
- * number, separated by a comma.
+ * four required fields node name, tree version, protocol version, and
+ * build number, separated by a comma.
*
* @param version
* The version string
/**
* Adds a peer, reading the noderef of the peer from the given file.
- * <strong>Note:</strong> the file to read the noderef from has to reside on
- * the same machine as the node!
+ * <strong>Note:</strong> the file to read the noderef from has to reside
+ * on the same machine as the node!
*
* @param file
* The name of the file containing the peer’s noderef
*
* @param global
* <code>true</code> to return requests from the global queue,
- * <code>false</code> to only show requests from the client-local
- * queue
+ * <code>false</code> to only show requests from the
+ * client-local queue
* @return All requests
* @throws IOException
* if an I/O error occurs
* Sets whether this request is complete.
*
* @param complete
- * <code>true</code> if this request is complete, false otherwise
+ * <code>true</code> if this request is complete, false
+ * otherwise
*/
void setComplete(boolean complete) {
this.complete = complete;
}
/**
- * Returns whether this request has fatally failed, i.e. repitition will not
- * cause the request to succeed.
+ * Returns whether this request has fatally failed, i.e. repitition will
+ * not cause the request to succeed.
*
* @return <code>true</code> if this request can not be made succeed by
* repeating, <code>false</code> otherwise
}
/**
- * Returns the number of required blocks. Any progress percentages should be
- * calculated against this value as 100%. Also, as long as
+ * Returns the number of required blocks. Any progress percentages should
+ * be calculated against this value as 100%. Also, as long as
* {@link #isFinalizedTotal()} returns {@code false} this value might
* change.
*
/**
* Package that holds all the message types that are used in the communication
* with a Freenet Node.
- *
+ *
* <h2>Usage</h2>
- *
+ *
* This library was designed to implement the full range of the Freenet Client
* Protocol, Version 2.0. At the moment the library provides a rather low-level
* approach, wrapping each FCP message into its own object but some kind of
* high-level client that does not require any interfaces to be implemented
* will probably provided as well.
- *
+ *
* First, create a connection to the node:
- *
+ *
* <pre>
* FcpConnection fcpConnection = new FcpConnection();
* </pre>
- *
+ *
* Now implement the {@link net.pterodactylus.fcp.FcpListener} interface
* and handle all incoming events.
- *
+ *
* <pre>
* public class MyClass implements FcpListener {
- *
+ *
* public void receivedProtocolError(FcpConnection fcpConnection, ProtocolError protocolError) {
* …
* }
- *
+ *
* // implement all further methods here
- *
+ *
* }
* </pre>
*/