Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.32
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.tribes.transport
Class ReceiverBase

    java.lang.Object
      org.apache.catalina.tribes.transport.ReceiverBase

All Implemented Interfaces:
  ChannelReceiver, Heartbeat, ListenCallback, RxTaskPool.TaskCreator

Direct Known Subclasses:
  BioReceiver, NioReceiver

    public abstract class ReceiverBase

extends java.lang.Object
implements ChannelReceiver, ListenCallback, RxTaskPool.TaskCreator

Title:

Description:

Company:

Version:
  1.0
Author:
  not attributable

Field Summary
`protected static Log` | `log`
`static int` | `OPTION_DIRECT_BUFFER`

Constructor Summary
`ReceiverBase()`

Method Summary
`protected int` | `bind(java.net.ServerSocket socket, int portstart, int retries)` recursive bind to find the next available port
`boolean` | `doListen()`
`java.lang.String` | `getAddress()`
`int` | `getAutoBind()`
`java.net.InetAddress` | `getBind()`
`boolean` | `getDirect()`
`java.util.concurrent.ExecutorService` | `getExecutor()`
`java.lang.String` | `getHost()` String representation of the IPv4 or IPv6 address that this host is listening to.
`MessageListener` | `getListener()`
`int` | `getMaxTasks()`
`int` | `getMaxThreads()`
`MessageListener` | `getMessageListener()` getMessageListener
`int` | `getMinTasks()`
`int` | `getMinThreads()`
`boolean` | `getOoBInline()`
`int` | `getPort()` Returns the listening port
`int` | `getRxBufSize()`
`int` | `getSecurePort()` Returns the secure listening port
`long` | `getSelectorTimeout()`
`boolean` | `getSoKeepAlive()`
`boolean` | `getSoLingerOn()`
`int` | `getSoLingerTime()`
`boolean` | `getSoReuseAddress()`
`int` | `getSoTrafficClass()`
`RxTaskPool` | `getTaskPool()`
`java.lang.String` | `getTcpListenAddress()` Deprecated. use getAddress
`int` | `getTcpListenPort()` Deprecated. use getPort
`boolean` | `getTcpNoDelay()`
`long` | `getTcpSelectorTimeout()` Deprecated. use getSelectorTimeout
`int` | `getTcpThreadCount()` Deprecated. use getMinThreads()/getMaxThreads()
`int` | `getTimeout()`
`int` | `getTxBufSize()`
`boolean` | `getUseBufferPool()`
`int` | `getWorkerThreadOptions()`
`void` | `heartbeat()` Heartbeat invokation for resources cleanup etc
`boolean` | `isListening()`
`void` | `messageDataReceived(ChannelMessage data)` This method is invoked on the callback object to notify it that new data has been received from one of the cluster nodes.
`void` | `setAddress(java.lang.String host)`
`void` | `setAutoBind(int autoBind)`
`void` | `setBind(java.net.InetAddress bind)`
`void` | `setDirect(boolean direct)`
`void` | `setExecutor(java.util.concurrent.ExecutorService executor)`
`void` | `setHost(java.lang.String host)`
`void` | `setListen(boolean doListen)`
`void` | `setListener(MessageListener listener)`
`void` | `setLog(Log log)`
`void` | `setMaxTasks(int maxTasks)`
`void` | `setMaxThreads(int maxThreads)`
`void` | `setMessageListener(MessageListener listener)` setMessageListener
`void` | `setMinTasks(int minTasks)`
`void` | `setMinThreads(int minThreads)`
`void` | `setOoBInline(boolean ooBInline)`
`void` | `setPool(RxTaskPool pool)`
`void` | `setPort(int port)`
`void` | `setRxBufSize(int rxBufSize)`
`void` | `setSecurePort(int securePort)`
`void` | `setSelectorTimeout(long selTimeout)`
`void` | `setSoKeepAlive(boolean soKeepAlive)`
`void` | `setSoLingerOn(boolean soLingerOn)`
`void` | `setSoLingerTime(int soLingerTime)`
`void` | `setSoReuseAddress(boolean soReuseAddress)`
`void` | `setSoTrafficClass(int soTrafficClass)`
`void` | `setTcpListenAddress(java.lang.String tcpListenHost)` Deprecated. use setAddress
`void` | `setTcpListenPort(int tcpListenPort)` Deprecated. use setPort
`void` | `setTcpNoDelay(boolean tcpNoDelay)`
`void` | `setTcpSelectorTimeout(long selTimeout)` Deprecated. use setSelectorTimeout
`void` | `setTcpThreadCount(int tcpThreadCount)` Deprecated. use setMaxThreads/setMinThreads
`void` | `setTimeout(int timeout)`
`void` | `setTxBufSize(int txBufSize)`
`void` | `setUseBufferPool(boolean useBufferPool)`
`void` | `start()` Start listening for incoming messages on the host/port
`void` | `stop()` Stop listening for messages

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.catalina.tribes.transport.RxTaskPool.TaskCreator
`createRxTask`

Field Detail

### OPTION_DIRECT_BUFFER

    public static final int OPTION_DIRECT_BUFFER

See Also:
  Constant Field Values

### log

    protected static Log log

Constructor Detail

### ReceiverBase

    public ReceiverBase()

Method Detail

### start

    public void start()
               throws java.io.IOException

  Description copied from interface: `ChannelReceiver`
  Start listening for incoming messages on the host/port

  Specified by:
    `start` in interface `ChannelReceiver`
  Throws:
    `java.io.IOException`

### stop

    public void stop()

  Description copied from interface: `ChannelReceiver`
  Stop listening for messages

  Specified by:
    `stop` in interface `ChannelReceiver`

### getMessageListener

    public MessageListener getMessageListener()

  getMessageListener

  Specified by:
    `getMessageListener` in interface `ChannelReceiver`
  Returns:
    MessageListener
  See Also:
    `MessageListener`

### getPort

    public int getPort()

  Description copied from interface: `ChannelReceiver`
  Returns the listening port

  Specified by:
    `getPort` in interface `ChannelReceiver`
  Returns:
    The port

### getRxBufSize

    public int getRxBufSize()

### getTxBufSize

    public int getTxBufSize()

### getTcpThreadCount

    public int getTcpThreadCount()

  Deprecated. use getMinThreads()/getMaxThreads()

  Returns:
    int

### setMessageListener

    public void setMessageListener(MessageListener listener)

  setMessageListener

  Specified by:
    `setMessageListener` in interface `ChannelReceiver`
  Parameters:
    `listener` - MessageListener
  See Also:
    `MessageListener`

### setTcpListenPort

    public void setTcpListenPort(int tcpListenPort)

  Deprecated. use setPort

  Parameters:
    `tcpListenPort` - int

### setTcpListenAddress

    public void setTcpListenAddress(java.lang.String tcpListenHost)

  Deprecated. use setAddress

  Parameters:
    `tcpListenHost` - String

### setRxBufSize

    public void setRxBufSize(int rxBufSize)

### setTxBufSize

    public void setTxBufSize(int txBufSize)

### setTcpThreadCount

    public void setTcpThreadCount(int tcpThreadCount)

  Deprecated. use setMaxThreads/setMinThreads

  Parameters:
    `tcpThreadCount` - int

### getBind

    public java.net.InetAddress getBind()

  Returns:
    Returns the bind.

### bind

    protected int bind(java.net.ServerSocket socket,
                       int portstart,
                       int retries)
                throws java.io.IOException

  recursive bind to find the next available port

  Parameters:
    `socket` - ServerSocket
    `portstart` - int
    `retries` - int
  Returns:
    int
  Throws:
    `java.io.IOException`

### messageDataReceived

    public void messageDataReceived(ChannelMessage data)

  Description copied from interface: `ListenCallback`
  This method is invoked on the callback object to notify it that new data has been received from one of the cluster nodes.

  Specified by:
    `messageDataReceived` in interface `ListenCallback`
  Parameters:
    `data` - - the message bytes received from the cluster/replication system

### getWorkerThreadOptions

    public int getWorkerThreadOptions()

### setBind

    public void setBind(java.net.InetAddress bind)

  Parameters:
    `bind` - The bind to set.

### getTcpListenPort

    public int getTcpListenPort()

  Deprecated. use getPort

  Returns:
    int

### getDirect

    public boolean getDirect()

### setDirect

    public void setDirect(boolean direct)

### getAddress

    public java.lang.String getAddress()

### getHost

    public java.lang.String getHost()

  Description copied from interface: `ChannelReceiver`
  String representation of the IPv4 or IPv6 address that this host is listening to.

  Specified by:
    `getHost` in interface `ChannelReceiver`
  Returns:
    the host that this receiver is listening to

### getSelectorTimeout

    public long getSelectorTimeout()

### getTcpSelectorTimeout

    public long getTcpSelectorTimeout()

  Deprecated. use getSelectorTimeout

  Returns:
    long

### doListen

    public boolean doListen()

### getListener

    public MessageListener getListener()

### getTaskPool

    public RxTaskPool getTaskPool()

### getTcpListenAddress

    public java.lang.String getTcpListenAddress()

  Deprecated. use getAddress

  Returns:
    String

### getAutoBind

    public int getAutoBind()

### getMaxThreads

    public int getMaxThreads()

### getMinThreads

    public int getMinThreads()

### getTcpNoDelay

    public boolean getTcpNoDelay()

### getSoKeepAlive

    public boolean getSoKeepAlive()

### getOoBInline

    public boolean getOoBInline()

### getSoLingerOn

    public boolean getSoLingerOn()

### getSoLingerTime

    public int getSoLingerTime()

### getSoReuseAddress

    public boolean getSoReuseAddress()

### getSoTrafficClass

    public int getSoTrafficClass()

### getTimeout

    public int getTimeout()

### getUseBufferPool

    public boolean getUseBufferPool()

### getSecurePort

    public int getSecurePort()

  Description copied from interface: `ChannelReceiver`
  Returns the secure listening port

  Specified by:
    `getSecurePort` in interface `ChannelReceiver`
  Returns:
    port, -1 if a secure port is not activated

### getMinTasks

    public int getMinTasks()

### getMaxTasks

    public int getMaxTasks()

### getExecutor

    public java.util.concurrent.ExecutorService getExecutor()

### isListening

    public boolean isListening()

### setTcpSelectorTimeout

    public void setTcpSelectorTimeout(long selTimeout)

  Deprecated. use setSelectorTimeout

  Parameters:
    `selTimeout` - long

### setSelectorTimeout

    public void setSelectorTimeout(long selTimeout)

### setListen

    public void setListen(boolean doListen)

### setAddress

    public void setAddress(java.lang.String host)

### setHost

    public void setHost(java.lang.String host)

### setListener

    public void setListener(MessageListener listener)

### setLog

    public void setLog(Log log)

### setPool

    public void setPool(RxTaskPool pool)

### setPort

    public void setPort(int port)

### setAutoBind

    public void setAutoBind(int autoBind)

### setMaxThreads

    public void setMaxThreads(int maxThreads)

### setMinThreads

    public void setMinThreads(int minThreads)

### setTcpNoDelay

    public void setTcpNoDelay(boolean tcpNoDelay)

### setSoKeepAlive

    public void setSoKeepAlive(boolean soKeepAlive)

### setOoBInline

    public void setOoBInline(boolean ooBInline)

### setSoLingerOn

    public void setSoLingerOn(boolean soLingerOn)

### setSoLingerTime

    public void setSoLingerTime(int soLingerTime)

### setSoReuseAddress

    public void setSoReuseAddress(boolean soReuseAddress)

### setSoTrafficClass

    public void setSoTrafficClass(int soTrafficClass)

### setTimeout

    public void setTimeout(int timeout)

### setUseBufferPool

    public void setUseBufferPool(boolean useBufferPool)

### setSecurePort

    public void setSecurePort(int securePort)

### setMinTasks

    public void setMinTasks(int minTasks)

### setMaxTasks

    public void setMaxTasks(int maxTasks)

### setExecutor

    public void setExecutor(java.util.concurrent.ExecutorService executor)

### heartbeat

    public void heartbeat()

  Description copied from interface: `Heartbeat`
  Heartbeat invokation for resources cleanup etc

  Specified by:
    `heartbeat` in interface `Heartbeat`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.32
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.