Class RemoteInvocationHandlerBuilder
java.lang.Object
dev.getelements.elements.rt.remote.RemoteInvocationHandlerBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteInvocationHandlerBuilder
(RemoteInvocationDispatcher remoteInvocationDispatcher, Class<?> type, Method method) RemoteInvocationHandlerBuilder
(RemoteInvoker remoteInvoker, Class<?> type, Method method) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theInvocationHandler
which will dispach calls to hte remote method.Returns theDispatch.Type
of this method.GetsMethod
.getName()
Gets the name of the remote object to invoke.Class
<?> getType()
Gets the type of the remote object to invoke.Sets the name of the remote object to invoke.
-
Constructor Details
-
RemoteInvocationHandlerBuilder
-
RemoteInvocationHandlerBuilder
public RemoteInvocationHandlerBuilder(RemoteInvocationDispatcher remoteInvocationDispatcher, Class<?> type, Method method)
-
-
Method Details
-
getType
Gets the type of the remote object to invoke. SpecifiesInvocation.getType()
.- Returns:
- the type
-
getName
Gets the name of the remote object to invoke. SpecifiesInvocation.getName()
.- Returns:
- the type
-
getMethod
GetsMethod
. SpecifiesInvocation.getName()
.- Returns:
- the type
-
getDispatchType
Returns theDispatch.Type
of this method.- Returns:
- the type of dispatch
-
withName
Sets the name of the remote object to invoke.Invocation.getName()
.- Parameters:
name
- may be null if no name is used.- Returns:
- this instance
-
build
Builds theInvocationHandler
which will dispach calls to hte remote method. This does so by building as much as possible ahead of time in order to provide type checking before methods are ever called. Secondly, the returnedInvocationHandler
performs minimal work to actually shuffle the arguments around when implementing the request/response schema.- Returns:
- the
InvocationHandler
-