LimeWire Consolidated API

org.limewire.lws.server
Class AbstractReceivesCommandsFromDispatcher

java.lang.Object
  extended by org.limewire.lws.server.AbstractReceivesCommandsFromDispatcher
All Implemented Interfaces:
LWSReceivesCommandsFromDispatcher

public abstract class AbstractReceivesCommandsFromDispatcher
extends Object
implements LWSReceivesCommandsFromDispatcher

This is what receives actual commands from an LWSDispatcherSupport. This class abstract out the #addConnectionListener(ConnectionListener adding, #removeConnectionListener(ConnectionListener removing, and #setConnected(boolean notifying of LWSConnectionListeners and leaves subclasses responsible for implementing the {@link ReceivesCommandsFromDispatcher#receiveCommand(String, java.util.Map command handling).


Constructor Summary
AbstractReceivesCommandsFromDispatcher()
           
 
Method Summary
 boolean addConnectionListener(LWSConnectionListener lis)
          Returns true if lis was added as a listener, false otherwise.
 boolean removeConnectionListener(LWSConnectionListener lis)
          Returns true if lis was removed as a listener, false otherwise.
 void setConnected(boolean isConnected)
          Called when we're connected from the server, and this should notify all the LWSConnectionListeners added by LWSReceivesCommandsFromDispatcher.addConnectionListener(LWSConnectionListener).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.limewire.lws.server.LWSReceivesCommandsFromDispatcher
receiveCommand
 

Constructor Detail

AbstractReceivesCommandsFromDispatcher

public AbstractReceivesCommandsFromDispatcher()
Method Detail

setConnected

public final void setConnected(boolean isConnected)
Description copied from interface: LWSReceivesCommandsFromDispatcher
Called when we're connected from the server, and this should notify all the LWSConnectionListeners added by LWSReceivesCommandsFromDispatcher.addConnectionListener(LWSConnectionListener).

Specified by:
setConnected in interface LWSReceivesCommandsFromDispatcher
Parameters:
isConnected - whether we're connected when a connection changes

addConnectionListener

public final boolean addConnectionListener(LWSConnectionListener lis)
Description copied from interface: LWSReceivesCommandsFromDispatcher
Returns true if lis was added as a listener, false otherwise.

Specified by:
addConnectionListener in interface LWSReceivesCommandsFromDispatcher
Parameters:
lis - new listener
Returns:
true if lis was added as a listener, false otherwise.

removeConnectionListener

public final boolean removeConnectionListener(LWSConnectionListener lis)
Description copied from interface: LWSReceivesCommandsFromDispatcher
Returns true if lis was removed as a listener, false otherwise.

Specified by:
removeConnectionListener in interface LWSReceivesCommandsFromDispatcher
Parameters:
lis - old listener
Returns:
true if lis was removed as a listener, false otherwise.

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.