com.sun.enterprise.mgmt.transport.grizzly.grizzly1_9
Class MulticastSelectorHandler

java.lang.Object
  extended by com.sun.grizzly.TCPSelectorHandler
      extended by com.sun.grizzly.UDPSelectorHandler
          extended by com.sun.grizzly.ReusableUDPSelectorHandler
              extended by com.sun.enterprise.mgmt.transport.grizzly.grizzly1_9.MulticastSelectorHandler
All Implemented Interfaces:
com.sun.grizzly.Handler, com.sun.grizzly.LinuxSpinningWorkaround, com.sun.grizzly.SelectorHandler, com.sun.grizzly.tcp.PendingIOhandler, com.sun.grizzly.util.AttributeHolder, com.sun.grizzly.util.Copyable, com.sun.grizzly.util.SupportStateHolder<com.sun.grizzly.util.State>

public class MulticastSelectorHandler
extends com.sun.grizzly.ReusableUDPSelectorHandler

Author:
Bongjae Chang

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.grizzly.TCPSelectorHandler
com.sun.grizzly.TCPSelectorHandler.ConnectChannelOperation, com.sun.grizzly.TCPSelectorHandler.RegisterChannelOperation, com.sun.grizzly.TCPSelectorHandler.RegisterKeyOperation, com.sun.grizzly.TCPSelectorHandler.RunnableOperation, com.sun.grizzly.TCPSelectorHandler.SelectionKeyCancelOperation
 
Field Summary
 
Fields inherited from class com.sun.grizzly.UDPSelectorHandler
datagramChannel, datagramSocket
 
Fields inherited from class com.sun.grizzly.TCPSelectorHandler
asyncQueueReader, asyncQueueWriter, attributes, connectorInstanceHandler, inet, instanceHandler, isKeepAlive, isShutDown, linger, logger, portRange, postponedTasks, receiveBufferSize, reuseAddress, role, selectionKeyHandler, selector, selectorHandlerTasks, selectTimeout, sendBufferSize, serverSocket, serverSocketChannel, serverTimeout, socketTimeout, ssBackLog, stateHolder, tcpNoDelay, threadPool
 
Constructor Summary
MulticastSelectorHandler()
           
 
Method Summary
 void copyTo(com.sun.grizzly.util.Copyable copy)
           
protected  Callable<com.sun.grizzly.ConnectorHandler> getConnectorInstanceHandlerDelegate()
           
protected  void onConnectOp(com.sun.grizzly.Context ctx, com.sun.grizzly.TCPSelectorHandler.ConnectChannelOperation connectChannelOp)
          Handle new OP_CONNECT ops.
 void preSelect(com.sun.grizzly.Context ctx)
          Before invoking Selector.select(), make sure the ServerScoketChannel has been created.
 void setMulticastAddress(String multicastAddress)
           
 void setNetworkInterface(String networkInterfaceName)
           
 
Methods inherited from class com.sun.grizzly.ReusableUDPSelectorHandler
closeChannel, getSelectableChannel
 
Methods inherited from class com.sun.grizzly.UDPSelectorHandler
getLinger, getPortLowLevel, getPreferredSelectionKeyHandler, getSocketNativeReceiveBufferSize, getSocketNativeSendBufferSize, getSocketTimeout, getSsBackLog, isTcpNoDelay, onAcceptInterest, protocol, setLinger, setSocketNativeReceiveBufferSize, setSocketNativeSendBufferSize, setSocketTimeout, setSsBackLog, setTcpNoDelay, shutdown
 
Methods inherited from class com.sun.grizzly.TCPSelectorHandler
acceptWithoutRegistration, acquireConnectorHandler, addPendingIO, addPendingKeyCancel, boolean2Role, configureChannel, connect, getAsyncQueueReader, getAsyncQueueWriter, getAttribute, getAttributes, getInet, getLogger, getPort, getPortRange, getProtocolChainInstanceHandler, getRole, getSelectionKeyHandler, getSelector, getSelectTimeout, getServerTimeout, getSpinRate, getStateHolder, getThreadPool, invokeAsyncQueueReader, invokeAsyncQueueWriter, invokeCallbackHandler, isExecutePendingIOUsingSelectorThread, isKeepAlive, isOpen, isReuseAddress, keyFor, keys, onConnectInterest, onReadInterest, onWriteInterest, pause, pollContext, postSelect, processPendingOperations, register, register, register, releaseConnectorHandler, removeAttribute, resetSpinCounter, resume, select, setAttribute, setAttributes, setExecutePendingIOUsingSelectorThread, setInet, setKeepAlive, setLogger, setMaxAcceptRetries, setPort, setPortRange, setProtocolChainInstanceHandler, setReceiveBufferSize, setReuseAddress, setRole, setSelectionKeyHandler, setSelector, setSelectTimeout, setSendBufferSize, setServerTimeout, setThreadPool, workaroundSelectorSpin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MulticastSelectorHandler

public MulticastSelectorHandler()
Method Detail

copyTo

public void copyTo(com.sun.grizzly.util.Copyable copy)
Specified by:
copyTo in interface com.sun.grizzly.util.Copyable
Overrides:
copyTo in class com.sun.grizzly.UDPSelectorHandler

preSelect

public void preSelect(com.sun.grizzly.Context ctx)
               throws IOException
Before invoking Selector.select(), make sure the ServerScoketChannel has been created. If true, then register all SelectionKey to the Selector.

Specified by:
preSelect in interface com.sun.grizzly.SelectorHandler
Overrides:
preSelect in class com.sun.grizzly.UDPSelectorHandler
Throws:
IOException

setMulticastAddress

public void setMulticastAddress(String multicastAddress)
                         throws UnknownHostException
Throws:
UnknownHostException

setNetworkInterface

public void setNetworkInterface(String networkInterfaceName)
                         throws SocketException
Throws:
SocketException

onConnectOp

protected void onConnectOp(com.sun.grizzly.Context ctx,
                           com.sun.grizzly.TCPSelectorHandler.ConnectChannelOperation connectChannelOp)
                    throws IOException
Handle new OP_CONNECT ops.

Overrides:
onConnectOp in class com.sun.grizzly.UDPSelectorHandler
Throws:
IOException

getConnectorInstanceHandlerDelegate

protected Callable<com.sun.grizzly.ConnectorHandler> getConnectorInstanceHandlerDelegate()
Overrides:
getConnectorInstanceHandlerDelegate in class com.sun.grizzly.UDPSelectorHandler


Copyright © 2012. All Rights Reserved.