/[classpath]/classpath/gnu/java/nio/SelectorImpl.java
ViewVC logotype

Diff of /classpath/gnu/java/nio/SelectorImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by patrik_reali, Sat Jul 31 16:07:21 2004 UTC revision 1.16.2.1 by gnu_andrew, Sun Jan 16 15:15:09 2005 UTC
# Line 1  Line 1 
1  /* SelectorImpl.java --  /* SelectorImpl.java --
2     Copyright (C) 2002, 2003  Free Software Foundation, Inc.     Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 35  this exception to your version of the li Line 35  this exception to your version of the li
35  obligated to do so.  If you do not wish to do so, delete this  obligated to do so.  If you do not wish to do so, delete this
36  exception statement from your version. */  exception statement from your version. */
37    
38    
39  package gnu.java.nio;  package gnu.java.nio;
40    
41    import gnu.classpath.Configuration;
42    
43  import java.io.IOException;  import java.io.IOException;
44  import java.nio.channels.ClosedSelectorException;  import java.nio.channels.ClosedSelectorException;
45  import java.nio.channels.SelectableChannel;  import java.nio.channels.SelectableChannel;
# Line 49  import java.util.Collections; Line 52  import java.util.Collections;
52  import java.util.HashSet;  import java.util.HashSet;
53  import java.util.Iterator;  import java.util.Iterator;
54  import java.util.Set;  import java.util.Set;
 import gnu.classpath.Configuration;  
55    
56  public class SelectorImpl extends AbstractSelector  public class SelectorImpl extends AbstractSelector
57  {  {
     
58    private Set keys;    private Set keys;
59    private Set selected;    private Set selected;
60    
# Line 375  public class SelectorImpl extends Abstra Line 376  public class SelectorImpl extends Abstra
376      SelectionKeyImpl result;      SelectionKeyImpl result;
377            
378      if (ch instanceof SocketChannelImpl)      if (ch instanceof SocketChannelImpl)
379        {        result = new SocketChannelSelectionKey (ch, this);
         SocketChannelImpl sc = (SocketChannelImpl) ch;  
         result = new SocketChannelSelectionKey (ch, this);  
       }  
380      else if (ch instanceof DatagramChannelImpl)      else if (ch instanceof DatagramChannelImpl)
381        {        result = new DatagramChannelSelectionKey (ch, this);
         DatagramChannelImpl dc = (DatagramChannelImpl) ch;  
         result = new DatagramChannelSelectionKey (ch, this);  
       }  
382      else if (ch instanceof ServerSocketChannelImpl)      else if (ch instanceof ServerSocketChannelImpl)
383        {        result = new ServerSocketChannelSelectionKey (ch, this);
         ServerSocketChannelImpl ssc = (ServerSocketChannelImpl) ch;  
         result = new ServerSocketChannelSelectionKey (ch, this);  
       }  
384      else      else
385        {        throw new InternalError ("No known channel type");
         throw new InternalError ("No known channel type");  
       }  
386    
387      synchronized (keys)      synchronized (keys)
388        {        {

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.16.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26