saker.build Documentation TaskDoc JavaDoc Packages
public final class MethodTransferProperties extends ExecutableTransferProperties<Method>
Describes the properties for a method for use with RMI.

This class describes the serialization of the parameters, result and also specifies how the method will be called.

The Builder should be used for construction, or the constructor MethodTransferProperties(Method) for annotation based properties parsing.

Nested types
public static final class
Builder class for custom construction of method properties.
Constructors
public
Creates an instance by examining the provided annotations on the given method.
Methods
public static Builder
builder(Method method)
Creates a new builder instance for this class.
public static RMIObjectWriteHandler
Creates a return value write handler for the given method.
public Constructor<extends Throwable>
Returns the constructor of the exception which should be used to rethrown RMI errors.
public Method
Returns non-null if the RMI method calls should be redirected to a specified method.
public Class<?>
Gets the return type of the method.
public RMIObjectWriteHandler
Gets the write handler for the return value of the method.
public boolean
Returns if the method result should be cached for future calls.
public boolean
Returns if the default method should be called in case of RMI failure.
public boolean
Returns if the method is not allowed to be called through RMI.
public boolean
Checks if the properties defined by this instance equals to the ones specified by the parameter.
Creates an instance by examining the provided annotations on the given method.

The annotations of the given method is examined and a configuration is parsed for use.

See the possible method and parameter annotations for more information. (package saker.rmi.annot.invoke and package saker.rmi.annot.transfer)

methodThe method for this properties.
RMIInvalidConfigurationExceptionIf the configuration is invalid.
public static Builder builder(Method method)
Creates a new builder instance for this class.
methodThe method to create the builder for.
The builder instance.
Creates a return value write handler for the given method.

The annotations on the method is parsed and the write handler is determined.

methodThe method to create the return value write handler for.
The write handler.
RMIInvalidConfigurationExceptionIn case of invalid configuration.
Returns the constructor of the exception which should be used to rethrown RMI errors.
Non-null if an exception rethrow type was specified.
Returns non-null if the RMI method calls should be redirected to a specified method.
The method to redirect the calls to or null.
public Class<?> getReturnType()
Gets the return type of the method.
The return type.
Gets the write handler for the return value of the method.

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

The write handler.
public boolean isCacheResult()
Returns if the method result should be cached for future calls.
true if the result should be cached.
public boolean isDefaultOnFailure()
Returns if the default method should be called in case of RMI failure.
true if the default method should be called.
public boolean isForbidden()
Returns if the method is not allowed to be called through RMI.

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

true if the method may not be called.
Checks if the properties defined by this instance equals to the ones specified by the parameter.

Equality is not checked for the enclosed executable. Two properties can equal regardless off the executable they are defined for.

otherThe other properties.
true if the two properties equal.