PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/kilim/nio/SessionTask.java

http://github.com/kilim/kilim
Java | 24 lines | 15 code | 4 blank | 5 comment | 4 complexity | 5f5db25c3b4c27a58a3f21669e2c4c27 MD5 | raw file
 1/* Copyright (c) 2006, Sriram Srinivasan
 2 *
 3 * You may distribute this software under the terms of the license 
 4 * specified in the file "License"
 5 */
 6
 7package kilim.nio;
 8
 9import java.io.IOException;
10import kilim.Task;
11
12public class SessionTask extends Task {
13    public EndPoint endpoint;
14
15    public void close() {
16        if (endpoint != null) {
17            IOException ex = endpoint.close2();
18            if (ex != null) Sched.log(getScheduler(),this,ex);
19        }
20    }
21    private static class Sched extends kilim.AffineScheduler {
22        static void log(kilim.Scheduler sched,Object src,Object obj) { logRelay(sched,src,obj); }
23    }
24}