Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.net
Class WrapperSelector

java.lang.Object
  extended by java.nio.channels.Selector
      extended by java.nio.channels.spi.AbstractSelector
          extended by com.tangosol.net.WrapperSelector


public class WrapperSelector
extends AbstractSelector

WrapperSelector is a Selector implementation which delegates all calls to a delegate Selector.

Since:
Coherence 3.6
Author:
mf 2010.04.27

Nested Class Summary
 class WrapperSelector.KeySet
          A layered set implementation used for key sets.
static interface WrapperSelector.WrapperSelectableChannel
          An interface to be implemented by all channels which will be selectable using this Selector.
static class WrapperSelector.WrapperSelectionKey
          WraperSelectionKey which delegates to a real SelectionKey.

 

Field Summary
protected  Selector m_delegate
          The wrapped Selector.
protected  Set m_setKeys
          The selector's keys
protected  Set m_setSelectedKeys
          The selector's selected keys

 

Constructor Summary
WrapperSelector(Selector selector, SelectorProvider provider)
          Construct a WrapperSelector

 

Method Summary
 Selector getDelegate()
          Return the Selector to which this selector delegates.
protected  void implCloseSelector()
          
 Set keys()
          
static Selector open()
          Unsupported.
protected  SelectionKey register(AbstractSelectableChannel ch, int ops, Object att)
          
 int select()
          
 int select(long timeout)
          
 Set selectedKeys()
          
 int selectNow()
          
 Selector wakeup()
          

 

Methods inherited from class java.nio.channels.spi.AbstractSelector
begin, cancelledKeys, close, deregister, end, isOpen, provider

 

Field Detail

m_delegate

protected final Selector m_delegate
The wrapped Selector.

m_setKeys

protected final Set m_setKeys
The selector's keys

m_setSelectedKeys

protected final Set m_setSelectedKeys
The selector's selected keys

Constructor Detail

WrapperSelector

public WrapperSelector(Selector selector,
                       SelectorProvider provider)
                throws IOException
Construct a WrapperSelector
Parameters:
selector - the selector to wrap
provider - the WrapperSocketProvider
Throws:
IOException - if an I/O error occurs

Method Detail

getDelegate

public Selector getDelegate()
Return the Selector to which this selector delegates.
Returns:
the Selector to which this selector delegates

open

public static Selector open()
Unsupported.
Returns:
never
Throws:
UnsupportedOperationException

keys

public Set keys()
Specified by:
keys in class Selector

selectedKeys

public Set selectedKeys()
Specified by:
selectedKeys in class Selector

select

public int select()
           throws IOException
Specified by:
select in class Selector
Throws:
IOException

selectNow

public int selectNow()
              throws IOException
Specified by:
selectNow in class Selector
Throws:
IOException

select

public int select(long timeout)
           throws IOException
Specified by:
select in class Selector
Throws:
IOException

wakeup

public Selector wakeup()
Specified by:
wakeup in class Selector

implCloseSelector

protected void implCloseSelector()
                          throws IOException
Specified by:
implCloseSelector in class AbstractSelector
Throws:
IOException

register

protected SelectionKey register(AbstractSelectableChannel ch,
                                int ops,
                                Object att)
Specified by:
register in class AbstractSelector

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.