On 20/08/07, Arnaud Simon <[EMAIL PROTECTED]> wrote:
>
> > 1. Methods as classes, rather than exposed arguments.
>
> This is debatable indeed. I am not sure that the performance should
> disfavor usability and ease of programming.
>
Ok, but there is a very easy way out of that one.
In my API I have to do:
messageTranfser(session, factory.createMethodMessageTransfer(...));
which is pretty ugly, and not designed for ease of programming.
No problem, just add a convenience method to the interface
public interface ClassMessageBroker
{
public void messageTransfer(SessionContext session,
MethodMesssageTransfer mt);
// for convenience, something along the lines of
public void messageTransfer(SessionContext session, byte[] data, String
destination, ...);
And do the method creation in the convenience method. Then you get the best
of both options.