org.jboss.messaging.core.remoting.impl.invm
Class InVMConnector

java.lang.Object
  extended by org.jboss.messaging.core.remoting.impl.invm.InVMConnector
All Implemented Interfaces:
Connector

public class InVMConnector
extends java.lang.Object
implements Connector

A InVMConnector

Author:
Tim Fox

Field Summary
protected  OrderedExecutorFactory executorFactory
           
static boolean failOnCreateConnection
           
protected  int id
           
static Logger log
           
static int numberOfFailures
           
 
Constructor Summary
InVMConnector(java.util.Map<java.lang.String,java.lang.Object> configuration, BufferHandler handler, ConnectionLifeCycleListener listener, java.util.concurrent.Executor threadPool)
           
 
Method Summary
 void close()
           
 Connection createConnection()
          Create and return a connection from this connector.
 void disconnect(java.lang.String connectionID)
           
 Acceptor getAcceptor()
           
 BufferHandler getHandler()
           
protected  Connection internalCreateConnection(BufferHandler handler, ConnectionLifeCycleListener listener, java.util.concurrent.Executor serverExecutor)
           
 boolean isStarted()
           
static void resetFailures()
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final Logger log

failOnCreateConnection

public static volatile boolean failOnCreateConnection

numberOfFailures

public static volatile int numberOfFailures

id

protected final int id

executorFactory

protected final OrderedExecutorFactory executorFactory
Constructor Detail

InVMConnector

public InVMConnector(java.util.Map<java.lang.String,java.lang.Object> configuration,
                     BufferHandler handler,
                     ConnectionLifeCycleListener listener,
                     java.util.concurrent.Executor threadPool)
Method Detail

resetFailures

public static void resetFailures()

getAcceptor

public Acceptor getAcceptor()

close

public void close()
Specified by:
close in interface Connector

isStarted

public boolean isStarted()
Specified by:
isStarted in interface Connector

createConnection

public Connection createConnection()
Description copied from interface: Connector
Create and return a connection from this connector. This method must NOT throw an exception if it fails to create the connection (e.g. network is not available), in this case it MUST return null

Specified by:
createConnection in interface Connector
Returns:
The connection, or null if unable to create a connection (e.g. network is unavailable)

start

public void start()
Specified by:
start in interface Connector

getHandler

public BufferHandler getHandler()

disconnect

public void disconnect(java.lang.String connectionID)

internalCreateConnection

protected Connection internalCreateConnection(BufferHandler handler,
                                              ConnectionLifeCycleListener listener,
                                              java.util.concurrent.Executor serverExecutor)


Copyright © 2006 JBoss Inc. All Rights Reserved.