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

java.lang.Object
  extended by org.jboss.messaging.core.remoting.impl.ChannelImpl
All Implemented Interfaces:
Channel

public class ChannelImpl
extends java.lang.Object
implements Channel

A ChannelImpl

Author:
Tim Fox

Constructor Summary
ChannelImpl(RemotingConnection connection, long id, int windowSize, boolean block)
           
 
Method Summary
 void close()
           
 void confirm(Packet packet)
           
 void executeOutstandingDelayedResults()
           
 void flushConfirmations()
           
 RemotingConnection getConnection()
           
 ChannelHandler getHandler()
           
 long getID()
           
 int getLastReceivedCommandID()
           
 java.util.concurrent.locks.Lock getLock()
           
 void handlePacket(Packet packet)
           
 void lock()
           
 void replayCommands(int otherLastReceivedCommandID, long newChannelID)
           
 void replicatePacket(Packet packet, long replicatedChannelID, java.lang.Runnable action)
           
 void returnBlocking()
           
 void send(Packet packet)
           
 void send(Packet packet, boolean flush)
           
 void sendAndFlush(Packet packet)
           
 Packet sendBlocking(Packet packet)
           
 void setCommandConfirmationHandler(CommandConfirmationHandler handler)
           
 void setHandler(ChannelHandler handler)
           
 void transferConnection(RemotingConnection newConnection, long newChannelID, Channel replicatingChannel)
           
 void unlock()
           
 void waitForAllReplicationResponse()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelImpl

public ChannelImpl(RemotingConnection connection,
                   long id,
                   int windowSize,
                   boolean block)
Method Detail

getID

public long getID()
Specified by:
getID in interface Channel

getLastReceivedCommandID

public int getLastReceivedCommandID()
Specified by:
getLastReceivedCommandID in interface Channel

getLock

public java.util.concurrent.locks.Lock getLock()
Specified by:
getLock in interface Channel

returnBlocking

public void returnBlocking()
Specified by:
returnBlocking in interface Channel

sendAndFlush

public void sendAndFlush(Packet packet)
Specified by:
sendAndFlush in interface Channel

send

public void send(Packet packet)
Specified by:
send in interface Channel

send

public void send(Packet packet,
                 boolean flush)

sendBlocking

public Packet sendBlocking(Packet packet)
                    throws MessagingException
Specified by:
sendBlocking in interface Channel
Throws:
MessagingException

replicatePacket

public void replicatePacket(Packet packet,
                            long replicatedChannelID,
                            java.lang.Runnable action)
Specified by:
replicatePacket in interface Channel

setCommandConfirmationHandler

public void setCommandConfirmationHandler(CommandConfirmationHandler handler)
Specified by:
setCommandConfirmationHandler in interface Channel

executeOutstandingDelayedResults

public void executeOutstandingDelayedResults()
Specified by:
executeOutstandingDelayedResults in interface Channel

setHandler

public void setHandler(ChannelHandler handler)
Specified by:
setHandler in interface Channel

getHandler

public ChannelHandler getHandler()
Specified by:
getHandler in interface Channel

close

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

transferConnection

public void transferConnection(RemotingConnection newConnection,
                               long newChannelID,
                               Channel replicatingChannel)
Specified by:
transferConnection in interface Channel

replayCommands

public void replayCommands(int otherLastReceivedCommandID,
                           long newChannelID)
Specified by:
replayCommands in interface Channel

lock

public void lock()
Specified by:
lock in interface Channel

unlock

public void unlock()
Specified by:
unlock in interface Channel

getConnection

public RemotingConnection getConnection()
Specified by:
getConnection in interface Channel

flushConfirmations

public void flushConfirmations()
Specified by:
flushConfirmations in interface Channel

confirm

public void confirm(Packet packet)
Specified by:
confirm in interface Channel

handlePacket

public void handlePacket(Packet packet)
Specified by:
handlePacket in interface Channel

waitForAllReplicationResponse

public void waitForAllReplicationResponse()
Specified by:
waitForAllReplicationResponse in interface Channel


Copyright © 2006 JBoss Inc. All Rights Reserved.