org.livetribe.slp.spi.net
Class NetworkConnector

java.lang.Object
  extended by org.livetribe.slp.spi.net.NetworkConnector
Direct Known Subclasses:
TCPConnector, UDPConnector

public abstract class NetworkConnector
extends Object

Version:
$Rev: 200 $ $Date: 2006-08-09 14:17:10 +0200 (Wed, 09 Aug 2006) $

Field Summary
protected  Logger logger
           
 
Constructor Summary
NetworkConnector()
           
 
Method Summary
protected  void accept(Runnable executor)
           
 void addMessageListener(MessageListener listener)
           
protected  void clearMessageListeners()
           
protected  edu.emory.mathcs.backport.java.util.concurrent.ExecutorService createAcceptorPool(int suggestedCoreSize)
           
protected abstract  Runnable[] createAcceptors()
           
protected  edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor createConnectionPool(int suggestedCoreSize)
           
protected abstract  void destroyAcceptors()
           
protected  void doStart()
           
protected  void doStop()
           
 InetAddress[] getInetAddresses()
           
protected  void handle(Runnable executor)
           
 boolean isRunning()
           
protected  void notifyMessageListeners(MessageEvent event)
           
 void removeMessageListener(MessageListener listener)
           
 void setAcceptorPool(edu.emory.mathcs.backport.java.util.concurrent.ExecutorService acceptorPool)
           
 void setConnectionPool(edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor threadPool)
           
 void setInetAddresses(InetAddress[] interfaceAddress)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Logger logger
Constructor Detail

NetworkConnector

public NetworkConnector()
Method Detail

setAcceptorPool

public void setAcceptorPool(edu.emory.mathcs.backport.java.util.concurrent.ExecutorService acceptorPool)

setConnectionPool

public void setConnectionPool(edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor threadPool)

addMessageListener

public void addMessageListener(MessageListener listener)

removeMessageListener

public void removeMessageListener(MessageListener listener)

clearMessageListeners

protected void clearMessageListeners()

getInetAddresses

public InetAddress[] getInetAddresses()

setInetAddresses

public void setInetAddresses(InetAddress[] interfaceAddress)

start

public void start()
           throws IOException
Throws:
IOException

doStart

protected void doStart()
                throws IOException
Throws:
IOException

createAcceptorPool

protected edu.emory.mathcs.backport.java.util.concurrent.ExecutorService createAcceptorPool(int suggestedCoreSize)

createConnectionPool

protected edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor createConnectionPool(int suggestedCoreSize)

isRunning

public boolean isRunning()

stop

public void stop()
          throws IOException
Throws:
IOException

doStop

protected void doStop()
               throws IOException
Throws:
IOException

createAcceptors

protected abstract Runnable[] createAcceptors()
                                       throws IOException
Throws:
IOException

destroyAcceptors

protected abstract void destroyAcceptors()
                                  throws IOException
Throws:
IOException

accept

protected void accept(Runnable executor)

handle

protected void handle(Runnable executor)

notifyMessageListeners

protected void notifyMessageListeners(MessageEvent event)


Copyright © 2006-2012 LiveTribe. All Rights Reserved.