Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added server and client sections


Every constructor is support ofBean and ofClass attributes. The value of ofBean must be a Sting. ofBean is only effected when a Spring context is provided. The value of ofClass can either be a String or an instance of Java Class.

According to Groovy Builders, constructors can be nested to each other. In that case, GroovyRestlet will automatically set up Restlet-specific relationship between parent and child instances. But user can disable this feature by setting autoAttach attribute as false.


The generic constructor for all components of type of Restlet. You can use ofClass attribute to indicate restlet to create an instance of a subtype. When doing that, using attribute consArgs to provide arguments array of corresponding constructor. For example:



This handle attribute is only effected when neither ofClass nor ofBean attribute is used.


A shortcut to create a Restlet Server. Instance of the nested constructor of a server will become the server's target. If more nested constructors are defined, only the last one will be selected.

  • protocol: the server protocol
  • protocols: a list of server protocols
  • address: the address of server
  • port: the port of server


A shortcut to create a Restlet Client.

  • protocol: the client protocol
  • protocols: a list of client protocols