You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wagon-dev@maven.apache.org by Michal Maczka <mm...@interia.pl> on 2004/12/08 03:47:28 UTC

[Fwd: Re: cvs commit: maven-wagon/wagon-provider-api/src/test/java/org/apache/maven/wagon AbstractWagonTest.java LazyFileOutputStreamTest.java]

brett@apache.org wrote

>  -    public void transferProgress( final TransferEvent transferEvent )
>  +    public void transferProgress( final TransferEvent transferEvent, 
> byte[] buffer, int
>  
>

Brett!

I am just curious what are the reasons for that change.
When I designed those methods I took into consideration two versions

a) public void transferProgress( final TransferEvent transferEvent )

b) public void transferProgress(  String param1, String param 2.... )

so either all values which are passed to observers are encapsulated 
inside the event object
or I am enumerating them one by one.


I finally have chosen a) as it makes the code shorter

It seems that you are trying to do something in the middle.
Why exactly have you decoupled some parameters from the event class and 
why only those two?

Michal




----------------------------------------------------------------------
Startuj z INTERIA.PL!!! >>> http://link.interia.pl/f1837


---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-dev-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-dev-help@maven.apache.org


Re: [Fwd: Re: cvs commit: maven-wagon/wagon-provider-api/src/test/java/org/apache/maven/wagon AbstractWagonTest.java LazyFileOutputStreamTest.java]

Posted by Brett Porter <br...@apache.org>.
>>  -    public void transferProgress( final TransferEvent transferEvent )
>>  +    public void transferProgress( final TransferEvent 
>> transferEvent, byte[] buffer, int
>>  
>>
>
> It seems that you are trying to do something in the middle.
> Why exactly have you decoupled some parameters from the event class 
> and why only those two?
>
These were the only two fields that changed during the event. You had a 
comment that maybe the event should be recreated for each bit of 
progress, but really it made sense as it already was. So the event was 
the complete transfer of a file, and only created once.

Does that make sense?

- Brett


---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-dev-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-dev-help@maven.apache.org