Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-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 java.nio.channels.spi.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  java.nio.channels.Selector m_delegate
          The wrapped Selector.
protected  java.util.Set m_setKeys
          The selector's keys
protected  java.util.Set m_setSelectedKeys
          The selector's selected keys

 

Constructor Summary
WrapperSelector(java.nio.channels.Selector selector, java.nio.channels.spi.SelectorProvider provider)
          Construct a WrapperSelector

 

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

 

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

 

Field Detail

m_delegate

protected final java.nio.channels.Selector m_delegate
The wrapped Selector.

m_setKeys

protected final java.util.Set m_setKeys
The selector's keys

m_setSelectedKeys

protected final java.util.Set m_setSelectedKeys
The selector's selected keys

Constructor Detail

WrapperSelector

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

Method Detail

getDelegate

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

open

public static java.nio.channels.Selector open()
Unsupported.
Returns:
never
Throws:
java.lang.UnsupportedOperationException

keys

public java.util.Set keys()
Specified by:
keys in class java.nio.channels.Selector

selectedKeys

public java.util.Set selectedKeys()
Specified by:
selectedKeys in class java.nio.channels.Selector

select

public int select()
           throws java.io.IOException
Specified by:
select in class java.nio.channels.Selector
Throws:
java.io.IOException

selectNow

public int selectNow()
              throws java.io.IOException
Specified by:
selectNow in class java.nio.channels.Selector
Throws:
java.io.IOException

select

public int select(long timeout)
           throws java.io.IOException
Specified by:
select in class java.nio.channels.Selector
Throws:
java.io.IOException

wakeup

public java.nio.channels.Selector wakeup()
Specified by:
wakeup in class java.nio.channels.Selector

implCloseSelector

protected void implCloseSelector()
                          throws java.io.IOException
Specified by:
implCloseSelector in class java.nio.channels.spi.AbstractSelector
Throws:
java.io.IOException

register

protected java.nio.channels.SelectionKey register(java.nio.channels.spi.AbstractSelectableChannel ch,
                                                  int ops,
                                                  java.lang.Object att)
Specified by:
register in class java.nio.channels.spi.AbstractSelector

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


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