org.relayirc.chatengine
Class ChannelSearch

java.lang.Object
  |
  +--org.relayirc.chatengine.ChannelSearch

public class ChannelSearch
extends java.lang.Object

Channel searcher. Works closely with a Server to search for channels that match the search criteria, notify listeners of each such matching channel as it is found and build a collection of matching channels.

Version:
$Revision: 1.6.2.4 $

The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Original Code: Relay IRC Chat Engine
Initial Developer: David M. Johnson
Contributor(s): No contributors to this file
Copyright (C) 1997-2000 by David M. Johnson
All Rights Reserved.
Author:
David M. Johnson.

Constructor Summary
ChannelSearch(Server server)
          Channel search needs a server.
 
Method Summary
 void addChannelSearchListener(ChannelSearchListener listener)
          Add search listener.
 Channel getChannelAt(int index)
          Number of channels found in most recent search, or null on error.
 int getChannelCount()
          Number of channels found in most recent search, or -1 on error.
 int getMaxUsers()
          Get maximum user-count criteria.
 int getMinUsers()
          Get minimum user-count criteria.
 java.lang.String getName()
          Get channel name search string.
 boolean isComplete()
          True if seach has completed.
 void removeChannelSearchListener(ChannelSearchListener listener)
          Remove search listener.
 void setMaxUsers(int min)
          Set maximum user-count criteria.
 void setMinUsers(int min)
          Set minimum user-count criteria.
 void setName(java.lang.String name)
          Set channel name search string.
 void start()
          Start the channel search with the current criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelSearch

public ChannelSearch(Server server)
Channel search needs a server.
Method Detail

getName

public java.lang.String getName()
Get channel name search string.

setName

public void setName(java.lang.String name)
Set channel name search string.

getMinUsers

public int getMinUsers()
Get minimum user-count criteria.

setMinUsers

public void setMinUsers(int min)
Set minimum user-count criteria.

getMaxUsers

public int getMaxUsers()
Get maximum user-count criteria.

setMaxUsers

public void setMaxUsers(int min)
Set maximum user-count criteria.

isComplete

public boolean isComplete()
True if seach has completed.

getChannelCount

public int getChannelCount()
Number of channels found in most recent search, or -1 on error.

getChannelAt

public Channel getChannelAt(int index)
Number of channels found in most recent search, or null on error.

start

public void start()
Start the channel search with the current criteria.

addChannelSearchListener

public void addChannelSearchListener(ChannelSearchListener listener)
Add search listener.

removeChannelSearchListener

public void removeChannelSearchListener(ChannelSearchListener listener)
Remove search listener.