/** * Sets the next Restlet as a Finder for a given resource class. When the * call is delegated to the Finder instance, a new instance of the resource * class will be created and will actually handle the request. * * @param nextClass * The next resource class to attach. */ public void setNext(Class<? extends ServerResource> nextClass) { setNext(createFinder(nextClass)); }
/** * Constructor using the protocol's default port. * * @param protocol * The connector protocol. * @param nextClass * The next server resource. */ public Server(Protocol protocol, Class<? extends ServerResource> nextClass) { this((Context) null, protocol); setNext(createFinder(nextClass)); }
/** * Constructor. * * @param context * The context. * @param protocol * The connector protocol. * @param nextClass * The next server resource. */ public Server(Context context, Protocol protocol, Class<? extends ServerResource> nextClass) { this(context, protocol); setNext(createFinder(nextClass)); }
/** * Constructor. * * @param protocol * The connector protocol. * @param port * The listening port. * @param nextClass * The next server resource. */ public Server(Protocol protocol, int port, Class<? extends ServerResource> nextClass) { this(protocol, port); setNext(createFinder(nextClass)); }
/** * Constructor. * * @param context * The context. * @param protocol * The connector protocol. * @param port * The listening port. * @param nextClass * The next server resource. */ public Server(Context context, Protocol protocol, int port, Class<? extends ServerResource> nextClass) { this(context, protocol, port); setNext(createFinder(nextClass)); }
/** * Constructor using the protocol's default port. * * @param protocol * The connector protocol. * @param address * The listening IP address (useful if multiple IP addresses * available). You can also use a domain name as an alias for the * IP address to listen to. * @param nextClass * The next server resource. */ public Server(Protocol protocol, String address, Class<? extends ServerResource> nextClass) { this(protocol, address); setNext(createFinder(nextClass)); }