Esri Geoportal Server
1.0

com.esri.gpt.control.rest.search
Class SearchThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.esri.gpt.control.rest.search.SearchThread
All Implemented Interfaces:
Runnable

public class SearchThread
extends Thread

The Class SearchThread.

Author:
UM,TM

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SearchThread(SearchContext context, String rid, ASearchEngine engine, CountDownLatch countDownLatch)
          Instantiates a new search thread.
 
Method Summary
 void addActionListener(ISearchListener listener)
          Adds the action listener.
 boolean getIsWorking()
          Gets the flag indicating if the search is in a working state.
 String getRID()
          Gets the RID.
 SearchContext getSearchContext()
          Gets the search context.
 ASearchEngine getSearchEngine()
          Gets the search engine.
 SearchStatus getSearchStatus()
          Gets the search status.
 boolean isTimeUp()
           
 void removeActionListener(ISearchListener listener)
          Removes the action listener.
 void run()
          Runs the process.
 void runWorker()
          Runs the thread process
 void setIsWorking(boolean isWorking)
          Sets the flag indicating if the search is in a working state.
 void setRID(String rid)
          Sets the RID.
 void setSearchContext(SearchContext searchContext)
          Sets the search context.
 void setSearchEngine(ASearchEngine searchEngine)
          Sets the search engine.
 void setSearchStatus(SearchStatus searchStatus)
          Sets the search status.
 void setTimeUp(boolean timeUp)
          Sets the time up.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchThread

public SearchThread(SearchContext context,
                    String rid,
                    ASearchEngine engine,
                    CountDownLatch countDownLatch)
Instantiates a new search thread.

Parameters:
context - the context
rid - the rid
Method Detail

getIsWorking

public boolean getIsWorking()
Gets the flag indicating if the search is in a working state.

Returns:
if the search is working

setIsWorking

public void setIsWorking(boolean isWorking)
Sets the flag indicating if the search is in a working state.

Parameters:
isWorking - true if the search is working

getSearchEngine

public ASearchEngine getSearchEngine()
Gets the search engine.

Returns:
the search engine

setSearchEngine

public void setSearchEngine(ASearchEngine searchEngine)
Sets the search engine.

Parameters:
searchEngine - the new search engine

getRID

public String getRID()
Gets the RID.

Returns:
the RID

setRID

public void setRID(String rid)
Sets the RID.

Parameters:
rid - the RID

getSearchContext

public SearchContext getSearchContext()
Gets the search context.

Returns:
the search context

setSearchContext

public void setSearchContext(SearchContext searchContext)
Sets the search context.

Parameters:
searchContext - the search context

isTimeUp

public boolean isTimeUp()

setTimeUp

public void setTimeUp(boolean timeUp)
Sets the time up. Called to notify the thread that its time is up.

Parameters:
timeUp - the new time up

getSearchStatus

public SearchStatus getSearchStatus()
Gets the search status.

Returns:
the search status

setSearchStatus

public void setSearchStatus(SearchStatus searchStatus)
Sets the search status.

Parameters:
searchStatus - the search status

addActionListener

public void addActionListener(ISearchListener listener)
Adds the action listener.

Parameters:
listener - the listener

removeActionListener

public void removeActionListener(ISearchListener listener)
Removes the action listener.

Parameters:
listener - the listener

run

public void run()
Runs the process.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

runWorker

public void runWorker()
Runs the thread process


Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.