17 |
protected abstract void implConfigureBlocking(boolean block); |
protected abstract void implConfigureBlocking(boolean block); |
18 |
|
|
19 |
|
|
20 |
Object blockingLock() |
public Object blockingLock() |
21 |
{ |
{ |
22 |
return LOCK; |
return LOCK; |
23 |
//Retrieves the object upon which the configureBlocking and register methods synchronize. |
//Retrieves the object upon which the configureBlocking and register methods synchronize. |
24 |
} |
} |
25 |
|
|
26 |
SelectableChannel configureBlocking(boolean block) |
public SelectableChannel configureBlocking(boolean block) |
27 |
{ |
{ |
28 |
synchronized(LOCK) |
synchronized(LOCK) |
29 |
{ |
{ |
34 |
return this; |
return this; |
35 |
} |
} |
36 |
|
|
37 |
protected void implCloseChannel() |
protected void implCloseChannel() |
38 |
{ |
{ |
39 |
// Closes this channel. |
// Closes this channel. |
40 |
implCloseSelectableChannel(); |
implCloseSelectableChannel(); |
41 |
} |
} |
42 |
|
|
43 |
|
|
44 |
boolean isBlocking() |
public boolean isBlocking() |
45 |
{ |
{ |
46 |
return blocking; |
return blocking; |
47 |
//Tells whether or not every I/O operation on this channel will block until it completes. |
//Tells whether or not every I/O operation on this channel will block until it completes. |
48 |
} |
} |
49 |
|
|
50 |
|
|
51 |
boolean isRegistered() |
public boolean isRegistered() |
52 |
{ |
{ |
53 |
//Tells whether or not this channel is currently registered with any selectors. |
//Tells whether or not this channel is currently registered with any selectors. |
54 |
return registered > 0; |
return registered > 0; |
64 |
} |
} |
65 |
} |
} |
66 |
|
|
67 |
SelectorProvider provider() |
public SelectorProvider provider() |
68 |
{ |
{ |
69 |
// Returns the provider that created this channel. |
// Returns the provider that created this channel. |
70 |
return sprovider; |
return sprovider; |
95 |
keys.add(k); |
keys.add(k); |
96 |
} |
} |
97 |
|
|
98 |
SelectionKey register(Selector selin, |
public SelectionKey register(Selector selin, |
99 |
int ops, |
int ops, |
100 |
Object att) throws ClosedChannelException |
Object att) throws java.nio.channels.ClosedChannelException |
101 |
|
|
102 |
|
|
103 |
{ |
{ |