saker.build Documentation TaskDoc JavaDoc Packages
Annotates the given RMI transfer point to use the RMIWrapper specified by this annotation.

The specified RMIWrapper class will be instantiated and used to transfer objects annotated on the given transfer point.

The following annotated methods in Stub are semantically the same:

 
 interface Stub {
 	// The two following method results will be transferred in the same way
 
 	@RMIWrap(NumberWrapper.class)
 	Number parse1(String s);
 
 	@RMIWriter(NumberWriteHandler.class)
 	Number parse2(String s);
 }
 
 class NumberWrapper implements RMIWrapper {
 	//... implement
 }
 
 class NumberWriteHandler extends WrapperRMIObjectWriteHandler {
 	public NumberWriteHandler() {
 		super(NumberWrapper.clas);
 	}
 }
 
As the example shows, this annotation lets you use RMIWrapper to transfer objects without creating a subclass to specify the proper write handler.

This annotation can be placed on types to configure class transfer properties automatically.

Methods
public Class<extends RMIWrapper>
The wrapper to use during transfer.
public abstract Class<extends RMIWrapper> value()
The wrapper to use during transfer.

The class should have a default constructor, and a constructor that can accept the target type as a single parameter.

The wrapper class.