Package org.sonews.daemon.command
Class XPatCommand
java.lang.Object
org.sonews.daemon.command.XPatCommand
- All Implemented Interfaces:
Command
XPAT header range|invalid input: '<'message-id> pat [pat...]
The XPAT command is used to retrieve specific headers from
specific articles, based on pattern matching on the contents of
the header. This command was first available in INN.
The required header parameter is the name of a header line (e.g.
"subject") in a news group article. See RFC-1036 for a list
of valid header lines. The required range argument may be
any of the following:
an article number
an article number followed by a dash to indicate
all following
an article number followed by a dash followed by
another article number
The required message-id argument indicates a specific
article. The range and message-id arguments are mutually
exclusive. At least one pattern in wildmat must be specified
as well. If there are additional arguments the are joined
together separated by a single space to form one complete
pattern. Successful responses start with a 221 response
followed by a the headers from all messages in which the
pattern matched the contents of the specified header line. This
includes an empty list. Once the output is complete, a period
is sent on a line by itself. If the optional argument is a
message-id and no such article exists, the 430 error response
is returned. A 502 response will be returned if the client only
has permission to transfer articles.
Responses
221 Header follows
430 no such article
502 no permission
Response Data:
art_nr fitting_header_value
[Source:"draft-ietf-nntp-imp-02.txt"] [Copyright: 1998 S. Barber]- Since:
- sonews/0.5.0
- Author:
- Christian Lins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]
boolean
Returns capability string that is implied by this command class.boolean
void
processLine
(NNTPConnection conn, String line, byte[] raw)
-
Constructor Details
-
XPatCommand
public XPatCommand()
-
-
Method Details
-
getSupportedCommandStrings
- Specified by:
getSupportedCommandStrings
in interfaceCommand
-
hasFinished
public boolean hasFinished()- Specified by:
hasFinished
in interfaceCommand
- Returns:
- true if this instance can be reused.
-
impliedCapability
Description copied from interface:Command
Returns capability string that is implied by this command class. MAY return null if the command is required by the NNTP standard.- Specified by:
impliedCapability
in interfaceCommand
-
isStateful
public boolean isStateful()- Specified by:
isStateful
in interfaceCommand
-
processLine
public void processLine(NNTPConnection conn, String line, byte[] raw) throws IOException, StorageBackendException - Specified by:
processLine
in interfaceCommand
- Throws:
IOException
StorageBackendException
-