Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Sending crendentials with every request

Hi Peter,

Not completely sure I understand what you are wanting to do, but you could look at overriding these methods:

1.  On service consumer/proxy, all rpc calls go through: org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.sendCallRequest(RemoteServiceRegistrationImpl, IRemoteCall)

to asynchronously send message for remote invoke.  As part of this impl of this, the following method is called:

sendSharedObjectMsgTo(remoteRegistration.getContainerID(), SharedObjectMsg.createMsg(CALL_REQUEST, request));

Note the CALL_REQUEST is a String == "handleCallRequest"

2.  On service impl/host side there is this method which gets called when CALL_REQUEST is received:


This ends up executing the request, and calling this method to send response back:

org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.sendCallResponse(ID, Response)

which calls this method to construct and send message:

                    sendSharedObjectMsgTo(responseTarget, SharedObjectMsg.createMsg(CALL_RESPONSE, new Response(response.getRequestId(), getSerializableException(e))));

Note the CALL_RESPONSE is String == "handleCallResponse"

3. On service consumer/proxy this method is then called:


If you want to add to what's sent in every rpc, you could add to the 1 (what client sends) and to 2 (what server received and how processes it) by adding your meta-data to the Request instance that's sent (has to be Serializable of course).

Does that help?



On 3/20/2020 1:14 AM, Peter Hermsdorf wrote:
Hi everyone,

I'm looking for a way of sending user credentials implicitly with every remote service request.

Background: we are migrating our RCP application to RAP. That means, multiple users are using one instance of a remote service concurrently. (the service instance is injected via DS)

Some of these service request are depending on the user calling the service on server side and I don't want to pollute my API by passing the username as parameter in the service request. (that would be the last option ...)

Any ideas or examples on how to accomplish this?

We are using the ECF generic server. I've looked into using ISharedObjectContainerClient.setConnectInitiatorPolicy but as the name states, that is only used when initially connecting to the server.

Thank you and all the best,

ecf-dev mailing list
To unsubscribe from this list, visit

Back to the top