[ 
https://issues.apache.org/jira/browse/LABS-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639184#action_12639184
 ] 

Ryan McKinley commented on LABS-197:
------------------------------------

{panel}
I wonder whether
public boolean isValidTask( Task task );
is more descriptive.
{panel}

This was my first inclination as well, but then how do we say *why* it is not 
valid.  Is the queue full?  Is maxDepth too big.  Does it point to a file my 
crawler does not want you to muck with?  Since the range of reasons is large 
and depends on the context, I think throwing an error is better.  Specific 
implementations can throw more descriptive exceptions if necessary.

- - - - - - - 

"may change the task "

I'm still torn on this.  The use case I'm thinking of is something to normalize 
task names.  For example:  http://www.apache.org/index.html -> 
http://www.apache.org/   perhaps C:\\data -> C:/data

Where does this kind of transformation make sense in our stack?  Perhaps 
whoever makes tasks is directly responsible?  Perhaps some general way to 
transform before getting in the queue.  I guess it is just a question of where 
we want that responsibility.

I'm not sure....



> Create TaskValidator -- include concepts like: maxDepth and maxSize
> -------------------------------------------------------------------
>
>                 Key: LABS-197
>                 URL: https://issues.apache.org/jira/browse/LABS-197
>             Project: Labs
>          Issue Type: Improvement
>          Components: Droids
>            Reporter: Ryan McKinley
>            Priority: Blocker
>         Attachments: LABS-197-taskValidator.patch
>
>
> The TaskQueue should have an expendable way to check if a Task is valid.
> perhaps something like:
> {code:java}
>  
> public interface TaskValidator {
>   public boolean validateTask( Task task ) throws InvalidTaskException;
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to