[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] About IRemoteCallParameter[] parsing

Hi Pavel,

On 1/25/2011 2:00 AM, Pavel Samolisov wrote:
Hello Folks,

I write an RPC adapter for ECF and have a question.

RPC uses parameters array for request, but parameters map, and each
parameter may not have a name, i.e.
RemoteCallFactory.createRemoteCall(RpcConstants.TEST_ECHO_METHOD_NAME,
new Object[]{"Hello, world!"});

I mean user MUST NOT register  a callable with parameter names, i.e.
user can register a callable
RemoteCallableFactory.createCallable(RpcConstants.TEST_ECHO_METHOD_NAME), but
to use a call
RemoteCallFactory.createRemoteCall(RpcConstants.TEST_ECHO_METHOD_NAME,
new Object[]{"Hello, world!"});

This callable does not have any parameters but the call have this ones.

Our implementation of preparing parameters (see
AbstractClientContainer#prepareParameters) uses default callable
parameters and, if this parameters are not defined, do not serialize
real call parameters.
Some more, RemoteCallParameter constructor has
Assert.isNotNull(this.name) that checks a name of parameter for null.

My question: should me refactoring this stuff or user just must register
callable with parameters if he/she want use call with parameters?

Refactoring is perfectly fine...if you have ideas for refactoring that will help with additional/other use cases then it can be done. Just open a bug for the api change idea, we'll discuss...but refactorings that are to be in ECF 3.5 must happen fairly quickly.


Thanks,

Scott