org.sr.server
Interface ICaller<E>
- Type Parameters:
E
- Request & Response Type
- All Known Subinterfaces:
- IJSONCaller
- All Known Implementing Classes:
- JSONCaller
public interface ICaller<E>
This interface represents a helper to access java objects and call requested method of them with the
parameters that included in the request.Request and response structures can be specified by implementations
of this interface. The only specifications comes with this interface are requests must contains target object
references, method names and parameters to execute target methods.
Request and response types are both can be any type rather than be Java objects. Implementations may target types
like JSON, XML, Binary and so on.
Caller implementations usually separated from end point implementations so that the end points doesn't
have to implement java access & type transformation logic in it. An end point (like HTTP,RMI, JMS, ...) implementation focuses
on collect messages and send responses.
- Author:
- Serhat Dirik
callAService
E callAService(ICallerContextInfo<?> context,
E request)
throws ServiceCallException
- Calls a java object method and returns the response
- Parameters:
context
- Caller contextrequest
-
- Returns:
-
- Throws:
ServiceCallException