saker.build Documentation TaskDoc JavaDoc Packages
Builder class for custom construction of method properties.
Constructors
public
Builder(Method method)
Creates a properties builder for the given method.
Methods
public MethodTransferProperties
Creates the transfer properties specified by this builder.
public Builder
cacheResult(boolean cache)
Sets if the result of an RMI method call should be cached for future reuse.
public Builder
defaultOnFailure(boolean defaultonfailure)
Sets if the default implementation should be called for the method in case of RMI error.
public Builder
forbidden(boolean forbidden)
Sets if this method is callable through RMI.
public Builder
Sets the write handler for the parameter at the specified index.
public Builder
Sets all of write handlers for every parameter.
public Builder
Sets the method to redirect RMI calls to.
public Builder
Sets the writer for the return value.
public Builder
rmiExceptionRethrow(Class<extends Throwable> rethrowclass)
Sets the class which to use to rethrow RMI errors.
public Builder
rmiExceptionRethrow(Constructor<extends Throwable> rethrowconstructor)
Sets the exception constructor which to use to rethrow RMI errors.
public Builder(Method method)
Creates a properties builder for the given method.

The annotations on the method are not taken into account.

methodThe method to create the builder for.
Creates the transfer properties specified by this builder.
The constructed transfer properties.
Sets if the result of an RMI method call should be cached for future reuse.
cachetrue if the result should be cached.
this
RMIInvalidConfigurationExceptionIn case of invalid configuration.
public Builder defaultOnFailure(boolean defaultonfailure) throws RMIInvalidConfigurationException
Sets if the default implementation should be called for the method in case of RMI error.
defaultonfailuretrue if the default implementation should be called.
this
RMIInvalidConfigurationExceptionIn case of invalid configuration.
public Builder forbidden(boolean forbidden) throws RMIInvalidConfigurationException
Sets if this method is callable through RMI.

When designing security sensitive applications, setting this true on the server side transfer properties doesn't protect against remote calls issued by the client. I.e. The forbidden method may still be called by a malicious client.

forbiddentrue if it may not be called.
this
RMIInvalidConfigurationExceptionIn case of invalid configuration.
Sets the write handler for the parameter at the specified index.
indexThe index of the parameter.
writerThe write handler.
this
Sets all of write handlers for every parameter.

The parameter array can contain null, in which case the default write handler will be used.

writersThe write handlers for the parameters.
this
IndexOutOfBoundsExceptionIf the parameter array is not the same length as the parameter count.
NullPointerExceptionIf the parameter array is null.
Sets the method to redirect RMI calls to.
methodThe redirected method or null to disable redirection.
this
RMIInvalidConfigurationExceptionIn case of invalid configuration.
Sets the writer for the return value.

The argument writer will be used when the method is invoked by a remote client.

writerThe write handler.
this
Sets the class which to use to rethrow RMI errors.
rethrowclassThe exception class to use or null to disable rethrowing.
this
RMIInvalidConfigurationExceptionIn case of invalid configuration.
Sets the exception constructor which to use to rethrow RMI errors.
rethrowconstructorThe constructor to create rethrown exceptions or null to disable rethrowing.
this
RMIInvalidConfigurationExceptionIn case of invalid configuration.