/[classpath]/classpath/java/nio/channels/spi/SelectorProvider.java
ViewVC logotype

Diff of /classpath/java/nio/channels/spi/SelectorProvider.java

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

revision 1.3 by egagnon, Sun Aug 11 20:08:43 2002 UTC revision 1.4 by mkoch, Wed Nov 13 10:53:38 2002 UTC
# 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  package java.nio.channels.spi;  package java.nio.channels.spi;
39    
40  import java.nio.channels.*;  import gnu.java.nio.SelectorProviderImpl;
41    import java.nio.channels.DatagramChannel;
42    import java.nio.channels.Pipe;
43    import java.nio.channels.ServerSocketChannel;
44    import java.nio.channels.SocketChannel;
45    
46    /**
47     * @author Michael Koch
48     * @since 1.4
49     */
50  public abstract class SelectorProvider  public abstract class SelectorProvider
51  {  {
52      protected SelectorProvider()    /**
53      {     * Initializes the selector provider.
54      }     */
55          protected SelectorProvider ()
56      public abstract  DatagramChannel openDatagramChannel();    {
57      public abstract  Pipe openPipe();    }
58      public abstract  AbstractSelector openSelector();    
59      public abstract  ServerSocketChannel openServerSocketChannel();    /**
60      public abstract  SocketChannel openSocketChannel();     * Opens a datagram channel.
61       */
62      public abstract DatagramChannel openDatagramChannel ();
63      
64      /**
65       * Opens a pipe.
66       */
67      public abstract Pipe openPipe ();
68      
69      /**
70       * Opens a selector.
71       */
72      public abstract AbstractSelector openSelector ();
73      
74      /**
75       * Opens a server socket channel.
76       */
77      public abstract ServerSocketChannel openServerSocketChannel ();
78      
79      /**
80       * Opens a socket channel.
81       */
82      public abstract SocketChannel openSocketChannel ();
83            
84      static SelectorProvider pr;
85            
86      static SelectorProvider pr;    /**
87       * Returns the system-wide default selector provider for this invocation
88       * of the Java virtual machine.
89       */
90      public static SelectorProvider provider ()
91      {
92        if (pr == null)
93          pr = new SelectorProviderImpl ();
94            
95      public static SelectorProvider provider()      return pr;
96      {    }
         if (pr == null)  
             {  
                 pr = new gnu.java.nio.SelectorProviderImpl();  
             }  
         return pr;  
     }  
97  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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