}
public void shutdown() {
- if(root instanceof ContextResponder)
- ((ContextResponder)root).destroy();
+ if(root instanceof Destroyable)
+ ((Destroyable)root).destroy();
try {
long last = 0;
while(true) {
if(resp == null) {
resp = create(sess);
sess.put(rcl, resp);
- if(resp instanceof ContextResponder) {
- final ContextResponder cr = (ContextResponder)resp;
+ if(resp instanceof Destroyable) {
+ final Destroyable cr = (Destroyable)resp;
sess.listen(new Session.Listener() {
public void destroy(Session sess) {
cr.destroy();