org.jboss.messaging.core.remoting.impl
Class RemotingConnectionImpl

java.lang.Object
  extended by org.jboss.messaging.core.remoting.impl.AbstractBufferHandler
      extended by org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl
All Implemented Interfaces:
RemotingConnection, BufferHandler

public class RemotingConnectionImpl
extends AbstractBufferHandler
implements RemotingConnection

Version:
$Revision: 7381 $ $Id: RemotingConnectionImpl.java 7381 2009-06-17 16:44:51Z timfox $
Author:
Tim Fox, Jeff Mesnil

Constructor Summary
RemotingConnectionImpl(Connection transportConnection, java.util.List<Interceptor> interceptors, boolean active)
           
RemotingConnectionImpl(Connection transportConnection, long blockingCallTimeout, java.util.List<Interceptor> interceptors)
           
 
Method Summary
 void activate()
           
 void addCloseListener(CloseListener listener)
           
 void addFailureListener(FailureListener listener)
           
 void bufferReceived(java.lang.Object connectionID, MessagingBuffer buffer)
           
 MessagingBuffer createBuffer(int size)
           
static RemotingConnection createConnection(ConnectorFactory connectorFactory, java.util.Map<java.lang.String,java.lang.Object> params, long callTimeout, java.util.concurrent.Executor threadPool, ConnectionLifeCycleListener listener)
           
 void destroy()
           
 void fail(MessagingException me)
           
 void freeze()
           
 long generateChannelID()
           
 long getBlockingCallTimeout()
           
 Channel getChannel(long channelID, int windowSize, boolean block)
           
 java.util.List<FailureListener> getFailureListeners()
           
 java.lang.Object getID()
           
 long getIDGeneratorSequence()
           
 java.lang.String getRemoteAddress()
           
 java.lang.Object getTransferLock()
           
 Connection getTransportConnection()
           
 boolean isActive()
           
 boolean isClient()
           
 boolean isDestroyed()
           
 void putChannel(long channelID, Channel channel)
           
 boolean removeChannel(long channelID)
           
 boolean removeCloseListener(CloseListener listener)
           
 boolean removeFailureListener(FailureListener listener)
           
 void setFailureListeners(java.util.List<FailureListener> listeners)
           
 void syncIDGeneratorSequence(long id)
           
 
Methods inherited from class org.jboss.messaging.core.remoting.impl.AbstractBufferHandler
isReadyToHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.messaging.core.remoting.spi.BufferHandler
isReadyToHandle
 

Constructor Detail

RemotingConnectionImpl

public RemotingConnectionImpl(Connection transportConnection,
                              long blockingCallTimeout,
                              java.util.List<Interceptor> interceptors)

RemotingConnectionImpl

public RemotingConnectionImpl(Connection transportConnection,
                              java.util.List<Interceptor> interceptors,
                              boolean active)
Method Detail

createConnection

public static RemotingConnection createConnection(ConnectorFactory connectorFactory,
                                                  java.util.Map<java.lang.String,java.lang.Object> params,
                                                  long callTimeout,
                                                  java.util.concurrent.Executor threadPool,
                                                  ConnectionLifeCycleListener listener)

getTransportConnection

public Connection getTransportConnection()
Specified by:
getTransportConnection in interface RemotingConnection

getFailureListeners

public java.util.List<FailureListener> getFailureListeners()
Specified by:
getFailureListeners in interface RemotingConnection

setFailureListeners

public void setFailureListeners(java.util.List<FailureListener> listeners)
Specified by:
setFailureListeners in interface RemotingConnection

getID

public java.lang.Object getID()
Specified by:
getID in interface RemotingConnection

getRemoteAddress

public java.lang.String getRemoteAddress()
Specified by:
getRemoteAddress in interface RemotingConnection

getChannel

public Channel getChannel(long channelID,
                          int windowSize,
                          boolean block)
Specified by:
getChannel in interface RemotingConnection

removeChannel

public boolean removeChannel(long channelID)
Specified by:
removeChannel in interface RemotingConnection

putChannel

public void putChannel(long channelID,
                       Channel channel)
Specified by:
putChannel in interface RemotingConnection

addFailureListener

public void addFailureListener(FailureListener listener)
Specified by:
addFailureListener in interface RemotingConnection

removeFailureListener

public boolean removeFailureListener(FailureListener listener)
Specified by:
removeFailureListener in interface RemotingConnection

addCloseListener

public void addCloseListener(CloseListener listener)
Specified by:
addCloseListener in interface RemotingConnection

removeCloseListener

public boolean removeCloseListener(CloseListener listener)
Specified by:
removeCloseListener in interface RemotingConnection

createBuffer

public MessagingBuffer createBuffer(int size)
Specified by:
createBuffer in interface RemotingConnection

fail

public void fail(MessagingException me)
Specified by:
fail in interface RemotingConnection

destroy

public void destroy()
Specified by:
destroy in interface RemotingConnection

generateChannelID

public long generateChannelID()
Specified by:
generateChannelID in interface RemotingConnection

syncIDGeneratorSequence

public void syncIDGeneratorSequence(long id)
Specified by:
syncIDGeneratorSequence in interface RemotingConnection

getIDGeneratorSequence

public long getIDGeneratorSequence()
Specified by:
getIDGeneratorSequence in interface RemotingConnection

getTransferLock

public java.lang.Object getTransferLock()
Specified by:
getTransferLock in interface RemotingConnection

isActive

public boolean isActive()
Specified by:
isActive in interface RemotingConnection

isClient

public boolean isClient()
Specified by:
isClient in interface RemotingConnection

isDestroyed

public boolean isDestroyed()
Specified by:
isDestroyed in interface RemotingConnection

getBlockingCallTimeout

public long getBlockingCallTimeout()
Specified by:
getBlockingCallTimeout in interface RemotingConnection

bufferReceived

public void bufferReceived(java.lang.Object connectionID,
                           MessagingBuffer buffer)
Specified by:
bufferReceived in interface BufferHandler

activate

public void activate()
Specified by:
activate in interface RemotingConnection

freeze

public void freeze()
Specified by:
freeze in interface RemotingConnection


Copyright © 2006 JBoss Inc. All Rights Reserved.