1 |
/* AbstractSelector.java -- |
/* AbstractSelector.java -- |
2 |
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. |
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
49 |
{ |
{ |
50 |
private boolean closed; |
private boolean closed; |
51 |
private SelectorProvider provider; |
private SelectorProvider provider; |
52 |
private HashSet cancelledKeys; |
private HashSet<SelectionKey> cancelledKeys; |
53 |
|
|
54 |
/** |
/** |
55 |
* Initializes the slector. |
* Initializes the slector. |
59 |
protected AbstractSelector(SelectorProvider provider) |
protected AbstractSelector(SelectorProvider provider) |
60 |
{ |
{ |
61 |
this.provider = provider; |
this.provider = provider; |
62 |
this.cancelledKeys = new HashSet(); |
this.cancelledKeys = new HashSet<SelectionKey>(); |
63 |
} |
} |
64 |
|
|
65 |
/** |
/** |
115 |
* |
* |
116 |
* @return the cancelled keys set |
* @return the cancelled keys set |
117 |
*/ |
*/ |
118 |
protected final Set cancelledKeys() |
protected final Set<SelectionKey> cancelledKeys() |
119 |
{ |
{ |
120 |
if (! isOpen()) |
if (! isOpen()) |
121 |
throw new ClosedSelectorException(); |
throw new ClosedSelectorException(); |