Java Doc for SelectionKey.java in  » Apache-Harmony-Java-SE » java-package » java » nio » channels » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.nio.channels.SelectionKey

All known Subclasses:   java.nio.channels.spi.AbstractSelectionKey,
SelectionKey
abstract public class SelectionKey (Code)
A key that representing the relationship of a channel and the selector.


Field Summary
final public static  intOP_ACCEPT
     Interesting operation mask bit for socket-accept operations.
final public static  intOP_CONNECT
     Interesting operation mask bit for socket-connect operations.
final public static  intOP_READ
     Interesting operation mask bit for read operations.
final public static  intOP_WRITE
     Interesting operation mask bit for write operations.

Constructor Summary
protected  SelectionKey()
     The constructor.

Method Summary
final public  Objectattach(Object anObject)
     Attaches an object to the key.
final public  Objectattachment()
     Gets the attached object.
abstract public  voidcancel()
     Cancels this key.
abstract public  SelectableChannelchannel()
     Gets the channel of this key.
abstract public  intinterestOps()
     Gets the interesting operation of this key.
abstract public  SelectionKeyinterestOps(int operations)
     Sets the interesting operation for this key.
final public  booleanisAcceptable()
     Tells whether the channel of this key is interested in accept operation and ready for acceptation.
final public  booleanisConnectable()
     Tells whether the channel of this key is interested in connect operation and ready for connection.
final public  booleanisReadable()
     Tells whether the channel of this key is interested in read operation and ready for reading.
abstract public  booleanisValid()
     Tells whether the key is valid.
final public  booleanisWritable()
     Tells whether the channel of this key is interested in write operation and ready for writing.
abstract public  intreadyOps()
     Gets the ready operation.
abstract public  Selectorselector()
     Gets the related selector.

Field Detail
OP_ACCEPT
final public static int OP_ACCEPT(Code)
Interesting operation mask bit for socket-accept operations.



OP_CONNECT
final public static int OP_CONNECT(Code)
Interesting operation mask bit for socket-connect operations.



OP_READ
final public static int OP_READ(Code)
Interesting operation mask bit for read operations.



OP_WRITE
final public static int OP_WRITE(Code)
Interesting operation mask bit for write operations.




Constructor Detail
SelectionKey
protected SelectionKey()(Code)
The constructor.




Method Detail
attach
final public Object attach(Object anObject)(Code)
Attaches an object to the key.
Parameters:
  anObject - the object to attach the last attached object



attachment
final public Object attachment()(Code)
Gets the attached object. the attached object or null if no object has been attached



cancel
abstract public void cancel()(Code)
Cancels this key.



channel
abstract public SelectableChannel channel()(Code)
Gets the channel of this key. the channel of this key



interestOps
abstract public int interestOps()(Code)
Gets the interesting operation of this key. the interesting operation of this key
throws:
  CancelledKeyException - If the key has been cancelled already



interestOps
abstract public SelectionKey interestOps(int operations)(Code)
Sets the interesting operation for this key.
Parameters:
  operations - the interesting operation to set this key
throws:
  IllegalArgumentException - if the given operation is not in the key's interestingoperation set
throws:
  CancelledKeyException - If the key has been cancelled already



isAcceptable
final public boolean isAcceptable()(Code)
Tells whether the channel of this key is interested in accept operation and ready for acceptation. true if the channel is interested in accept operation and readyfor acceptation
throws:
  CancelledKeyException - If the key has been cancelled already



isConnectable
final public boolean isConnectable()(Code)
Tells whether the channel of this key is interested in connect operation and ready for connection. true if the channel is interested in connect operation and readyfor connection
throws:
  CancelledKeyException - If the key has been cancelled already



isReadable
final public boolean isReadable()(Code)
Tells whether the channel of this key is interested in read operation and ready for reading. true if the channel is interested in read operation and ready forreading
throws:
  CancelledKeyException - If the key has been cancelled already



isValid
abstract public boolean isValid()(Code)
Tells whether the key is valid. true if the key has not been cancelled



isWritable
final public boolean isWritable()(Code)
Tells whether the channel of this key is interested in write operation and ready for writing. true if the channel is interested in write operation and readyfor writing
throws:
  CancelledKeyException - If the key has been cancelled already



readyOps
abstract public int readyOps()(Code)
Gets the ready operation. the ready operation
throws:
  CancelledKeyException - If the key has been cancelled already



selector
abstract public Selector selector()(Code)
Gets the related selector. the related selector



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.