org.openbandy.net.client
Class SmsScanner

java.lang.Object
  extended by java.lang.Thread
      extended by org.openbandy.event.EventSource
          extended by org.openbandy.net.client.SmsScanner
All Implemented Interfaces:
java.lang.Runnable

public class SmsScanner
extends EventSource

TODO describe purpose and usage

(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.

Version:
0.1
Author:
Philipp Bolliger (philipp@bolliger.name)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SmsScanner(EventSourceOwner owner)
           
 
Method Summary
 java.util.Vector getProvidedEventTypes()
          While registering at the EventService, the latter will request the EventSource to state the types of Events it will delegate.
 EventSource newlyInstantiate()
          As the EventService must eventually create new instances of an EventSource in order to restart it, an EventSource must provide this method which must create (and return) a new instance and subsequently reset its reference in the class owning it.
 void run()
          Starts the EventSource.
 void stopEventSource()
          Stops the source.
 void stopEventSource(java.lang.String eventShortClassName)
          Advises the EventSource, that events of type eventShortClassName will no longer be conumsed.
 
Methods inherited from class org.openbandy.event.EventSource
isRunning, startEventSource
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmsScanner

public SmsScanner(EventSourceOwner owner)
Method Detail

getProvidedEventTypes

public java.util.Vector getProvidedEventTypes()
Description copied from class: EventSource
While registering at the EventService, the latter will request the EventSource to state the types of Events it will delegate.

Specified by:
getProvidedEventTypes in class EventSource
Returns:
A Vector of Strings containing the short class names of the Events.

newlyInstantiate

public EventSource newlyInstantiate()
Description copied from class: EventSource
As the EventService must eventually create new instances of an EventSource in order to restart it, an EventSource must provide this method which must create (and return) a new instance and subsequently reset its reference in the class owning it.

Specified by:
newlyInstantiate in class EventSource

run

public void run()
Description copied from class: EventSource
Starts the EventSource.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class EventSource

stopEventSource

public void stopEventSource(java.lang.String eventShortClassName)
Description copied from class: EventSource
Advises the EventSource, that events of type eventShortClassName will no longer be conumsed. If non of the provided event types is consumed, stop the event source thread.

Specified by:
stopEventSource in class EventSource

stopEventSource

public void stopEventSource()
Description copied from class: EventSource
Stops the source.

Specified by:
stopEventSource in class EventSource