Class WebClientJob

All Implemented Interfaces:
Runnable, ArooaContextAware, ArooaSessionAware, BeanDirectoryOwner, PropertyChangeNotifier, Iconic, RemoteDirectoryOwner, ConsoleArchiver, LogArchiver, LogEnabled, Resettable, Stateful, Stoppable, Structural

public class WebClientJob extends SimpleService implements Structural, LogArchiver, ConsoleArchiver, RemoteDirectoryOwner
Author:
Rob Gordon

Description

An Oddjob client that works over http.
  • Field Details

    • DEFAULT_LOG_POLLING_INTERVAL

      public static final long DEFAULT_LOG_POLLING_INTERVAL
      See Also:
  • Constructor Details

    • WebClientJob

      public WebClientJob()
  • Method Details

    • addLogListener

      public void addLogListener(LogListener l, Object component, LogLevel level, long last, int history)
      Description copied from interface: LogArchiver
      Add a listener to the archiver which will receive all missed events. The idea of receiving only missed events is to minimise network traffic when used remotely.

      Event numbers begin at 0. To receive all events, last must be -1.

      Specified by:
      addLogListener in interface LogArchiver
      Parameters:
      l - The logListener which will receive the events.
      level - The level of events required.
      last - The last event number received. The LogArchive will not send messages from before this number.
      history - The maximum messages to send up to the most recent.
    • removeLogListener

      public void removeLogListener(LogListener l, Object component)
      Description copied from interface: LogArchiver
      Remove the LogListener.
      Specified by:
      removeLogListener in interface LogArchiver
      Parameters:
      l - The LogListener.
    • addConsoleListener

      public void addConsoleListener(LogListener l, Object component, long last, int max)
      Description copied from interface: ConsoleArchiver
      Add a listener to the archiver which will receive all missed events. The idea of receiving only missed event is to minimise network traffic when used remotely.
      Specified by:
      addConsoleListener in interface ConsoleArchiver
      Parameters:
      l - The logListener which will receive the events.
      component - The component whose console to receive events for.
      last - The last event number received. The LogArchive will not send messages from before this number.
      max - The maximum messages to send up to the most recent.
    • removeConsoleListener

      public void removeConsoleListener(LogListener l, Object component)
      Description copied from interface: ConsoleArchiver
      Remove the LogListener.
      Specified by:
      removeConsoleListener in interface ConsoleArchiver
      Parameters:
      l - The LogListener.
    • consoleIdFor

      public String consoleIdFor(Object component)
      Description copied from interface: ConsoleArchiver
      Get the console id for a given component.
      Specified by:
      consoleIdFor in interface ConsoleArchiver
      Parameters:
      component - The component.
      Returns:
      The console id.
    • onInitialised

      public void onInitialised()
      Description copied from class: BaseComponent
      Subclasses override this method to perform post creation initialisation.
      Overrides:
      onInitialised in class BaseComponent
    • onStart

      protected void onStart() throws RemoteException
      Specified by:
      onStart in class SimpleService
      Throws:
      RemoteException
    • onStop

      protected void onStop()
      Description copied from class: SimpleService
      Allow sub classes to do something on stop.
      Overrides:
      onStop in class SimpleService
    • doStop

      protected void doStop(WebClientJob.WhyStop why, Exception cause)
    • onStop

      protected void onStop(WebClientJob.WhyStop why)
    • provideBeanDirectory

      public RemoteDirectory provideBeanDirectory()
      Description copied from interface: RemoteDirectoryOwner
      Provide a remote directory.
      Specified by:
      provideBeanDirectory in interface BeanDirectoryOwner
      Specified by:
      provideBeanDirectory in interface RemoteDirectoryOwner
      Returns:
      The BeanDirectory or null.
    • addStructuralListener

      public void addStructuralListener(StructuralListener listener)
      Description copied from interface: Structural
      Add a listener. The listener will immediately receive add notifications for all existing children.
      Specified by:
      addStructuralListener in interface Structural
      Parameters:
      listener - The listener.
    • removeStructuralListener

      public void removeStructuralListener(StructuralListener listener)
      Description copied from interface: Structural
      Remove a listener.
      Specified by:
      removeStructuralListener in interface Structural
      Parameters:
      listener - The listener.
    • getHeartbeat

      public long getHeartbeat()
    • setHeartbeat

      public void setHeartbeat(long heartbeat)
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
    • getMaxConsoleLines

      public int getMaxConsoleLines()
    • setMaxConsoleLines

      public void setMaxConsoleLines(int maxConsoleLines)
    • getMaxLoggerLines

      public int getMaxLoggerLines()
    • setMaxLoggerLines

      public void setMaxLoggerLines(int maxLoggerLines)
    • getLogPollingInterval

      public long getLogPollingInterval()
    • setLogPollingInterval

      public void setLogPollingInterval(long logPollingInterval)
    • getHandlerFactories

      public HandlerFactoryProvider getHandlerFactories()
    • setHandlerFactories

      public void setHandlerFactories(HandlerFactoryProvider handlerFactories)