Page 1 of 1

send response without extends BaseClientRequestHandler

Posted: 06 Aug 2019, 10:59
by balasourav
I want to response to client without extends BaseClientRequestHandler in java.

for example
-----------

Code: Select all

public class Request_Handler extends BaseClientRequestHandler
{
	
	@Override
	public void handleClientRequest(User sender, ISFSObject params) 
	{
        
        }
}
If i want to send values to client, I should extend the BaseClientRequestHandler. In One of my sender class i dont want to extend the "BaseClientRequestHandler" , what can i do. Anyother methods there to send response to client without extends "BaseClientRequestHandler".

Re: send response without extends BaseClientRequestHandler

Posted: 06 Aug 2019, 17:17
by Lapo
Hi,
you don't need to extend BaseClientRequestHandler to send data to a client. BaseClientRequestHandler should be extended only to create a class that handles a specific request in your game.

Since your main Extension class exposes a public send() method you can get a reference to it and invoke it from there.
There's also another way. You can directly call the SFSApi.sendExtensionResponse() method.

Hope it helps

Re: send response without extends BaseClientRequestHandler

Posted: 21 Aug 2019, 11:23
by balasourav
Thanks Lapo. Thanks for your information.