Java Doc for AbstractSelectableChannel.java in  » Apache-Harmony-Java-SE » java-package » java » nio » channels » spi » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.nio.channels.spi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.nio.channels.spi.AbstractInterruptibleChannel
      java.nio.channels.SelectableChannel
         java.nio.channels.spi.AbstractSelectableChannel

All known Subclasses:   java.nio.channels.SocketChannel,  java.nio.channels.DatagramChannel,  java.nio.channels.ServerSocketChannel,
AbstractSelectableChannel
abstract public class AbstractSelectableChannel extends SelectableChannel (Code)
Abstract class for selectable channels.

In this class, there are methods about registering/deregistering a channel, about channel closing. It realize the multi-thread safe.



Field Summary
 booleanisBlocking
    

Constructor Summary
protected  AbstractSelectableChannel(SelectorProvider selectorProvider)
     Constructor for this class.

Method Summary
final public  ObjectblockingLock()
    
final public  SelectableChannelconfigureBlocking(boolean blockingMode)
     Set the blocking mode of this channel.
synchronized  voidderegister(SelectionKey k)
    
final protected synchronized  voidimplCloseChannel()
     Implement the closing function.
abstract protected  voidimplCloseSelectableChannel()
     Implement the closing function of the SelectableChannel.
abstract protected  voidimplConfigureBlocking(boolean blockingMode)
     Implement the setting of blocking mode.
final public  booleanisBlocking()
    
final public synchronized  booleanisRegistered()
    
final public synchronized  SelectionKeykeyFor(Selector selector)
    
final public  SelectorProviderprovider()
     Answer the SelectorProvider of this channel.
final public  SelectionKeyregister(Selector selector, int interestSet, Object attachment)
     Realize the register function.

It registers current channel to the selector, then answer the selection key.


Field Detail
isBlocking
boolean isBlocking(Code)




Constructor Detail
AbstractSelectableChannel
protected AbstractSelectableChannel(SelectorProvider selectorProvider)(Code)
Constructor for this class.
Parameters:
  selectorProvider - A instance of SelectorProvider




Method Detail
blockingLock
final public Object blockingLock()(Code)

See Also:   java.nio.channels.SelectableChannel.blockingLock



configureBlocking
final public SelectableChannel configureBlocking(boolean blockingMode) throws IOException(Code)
Set the blocking mode of this channel.
See Also:   java.nio.channels.SelectableChannel.configureBlocking(boolean)
Parameters:
  blockingMode - true for blocking mode; falsefor non-blocking mode.



deregister
synchronized void deregister(SelectionKey k)(Code)



implCloseChannel
final protected synchronized void implCloseChannel() throws IOException(Code)
Implement the closing function.
See Also:   java.nio.channels.spi.AbstractInterruptibleChannel.implCloseChannel



implCloseSelectableChannel
abstract protected void implCloseSelectableChannel() throws IOException(Code)
Implement the closing function of the SelectableChannel.
throws:
  IOException - If some I/O exception occurred.



implConfigureBlocking
abstract protected void implConfigureBlocking(boolean blockingMode) throws IOException(Code)
Implement the setting of blocking mode.
Parameters:
  blockingMode - true for blocking mode; falsefor non-blocking mode.
throws:
  IOException - If some I/O exception occurred.



isBlocking
final public boolean isBlocking()(Code)

See Also:   java.nio.channels.SelectableChannel.isBlocking



isRegistered
final public synchronized boolean isRegistered()(Code)

See Also:   java.nio.channels.SelectableChannel.isRegistered



keyFor
final public synchronized SelectionKey keyFor(Selector selector)(Code)

See Also:   java.nio.channels.SelectableChannel.keyFor(java.nio.channels.Selector)



provider
final public SelectorProvider provider()(Code)
Answer the SelectorProvider of this channel.
See Also:   java.nio.channels.SelectableChannel.provider The provider of this channel.



register
final public SelectionKey register(Selector selector, int interestSet, Object attachment) throws ClosedChannelException(Code)
Realize the register function.

It registers current channel to the selector, then answer the selection key. The channel must be open and the interest op set must be valid. If the current channel is already registered to the selector, the method only set the new interest op set; otherwise it will call the register in selector, and add the relative key to the key set of the current channel.


See Also:   java.nio.channels.SelectableChannel.register(java.nio.channels.Selectorintjava.lang.Object)



Methods inherited from java.nio.channels.SelectableChannel
abstract public Object blockingLock()(Code)(Java Doc)
abstract public SelectableChannel configureBlocking(boolean block) throws IOException(Code)(Java Doc)
abstract public boolean isBlocking()(Code)(Java Doc)
abstract public boolean isRegistered()(Code)(Java Doc)
abstract public SelectionKey keyFor(Selector sel)(Code)(Java Doc)
abstract public SelectorProvider provider()(Code)(Java Doc)
final public SelectionKey register(Selector selector, int operations) throws ClosedChannelException(Code)(Java Doc)
abstract public SelectionKey register(Selector sel, int ops, Object att) throws ClosedChannelException(Code)(Java Doc)
abstract public int validOps()(Code)(Java Doc)

Fields inherited from java.nio.channels.spi.AbstractInterruptibleChannel
volatile boolean interrupted(Code)(Java Doc)
static Method setInterruptAction(Code)(Java Doc)

Methods inherited from java.nio.channels.spi.AbstractInterruptibleChannel
final protected void begin()(Code)(Java Doc)
final public void close() throws IOException(Code)(Java Doc)
final protected void end(boolean success) throws AsynchronousCloseException(Code)(Java Doc)
abstract protected void implCloseChannel() throws IOException(Code)(Java Doc)
final public synchronized boolean isOpen()(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.