Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.widget
Class AbstractWidgetProvider

    java.lang.Object
      org.jboss.portal.widget.AbstractWidgetProvider

All Implemented Interfaces:
  WidgetProvider

Direct Known Subclasses:
  GGProvider, NetvibesProvider

    public abstract class AbstractWidgetProvider

extends java.lang.Object
implements WidgetProvider

Version:
  $Revision$
Author:
  Emanuel Muckenhuber

Field Summary
`protected int` | `connectionTimeout` The connection timeout
`protected java.util.concurrent.ConcurrentMap<java.net.URL,ExpiringFutureTask<Widget>>` | `entries` The widget entry map
`protected long` | `entryExpiration` The entry expiration time in millis (default: 6 hours)
`protected java.util.concurrent.ExecutorService` | `executor` The executor
`protected java.util.concurrent.ConcurrentMap<WidgetQuery,ExpiringFutureTask<DirectoryQueryResult>>` | `queries` The query result map
`protected long` | `queryExpiration` The query expiration time in millis (default: 1 hour)
`protected java.util.concurrent.ScheduledExecutorService` | `scheduledExecutor` The scheduled executor
`protected long` | `timing` Eviction thread timing

Constructor Summary
`AbstractWidgetProvider()`

Method Summary
`protected abstract void` | `addDirectoryResult(WidgetQuery query)` Abstract method for adding a directory query and submitting to the executor
`protected abstract void` | `addWidget(java.net.URL url)` Abstract method for adding a widget url and submitting it to the executor
`long` | `getConnectionTimeout()`
`Widget` | `getWidget(java.lang.String string)`
`Widget` | `getWidget(java.net.URL url)` Get widget (instance of WidgetFailure on failure)
`DirectoryQueryResult` | `search(WidgetQuery q)`
`void` | `setConnectionTimeout(int connectionTimeout)`
`void` | `setEntryExpiration(long millis)`
`void` | `setFetchWidgetsOnDirectoryLookup(boolean fetch)`
`void` | `setQueryExpiration(long millis)`
`void` | `start()`
`void` | `stop()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### entries

    protected java.util.concurrent.ConcurrentMap<java.net.URL,ExpiringFutureTask<Widget>> entries

  The widget entry map

### queries

    protected java.util.concurrent.ConcurrentMap<WidgetQuery,ExpiringFutureTask<DirectoryQueryResult>> queries

  The query result map

### executor

    protected java.util.concurrent.ExecutorService executor

  The executor

### scheduledExecutor

    protected java.util.concurrent.ScheduledExecutorService scheduledExecutor

  The scheduled executor

### entryExpiration

    protected long entryExpiration

  The entry expiration time in millis (default: 6 hours)

### queryExpiration

    protected long queryExpiration

  The query expiration time in millis (default: 1 hour)

### connectionTimeout

    protected int connectionTimeout

  The connection timeout

### timing

    protected long timing

  Eviction thread timing

Constructor Detail

### AbstractWidgetProvider

    public AbstractWidgetProvider()

Method Detail

### start

    public void start()

  Specified by:
    `start` in interface `WidgetProvider`

### stop

    public void stop()

  Specified by:
    `stop` in interface `WidgetProvider`

### getConnectionTimeout

    public long getConnectionTimeout()

### setConnectionTimeout

    public void setConnectionTimeout(int connectionTimeout)

  Specified by:
    `setConnectionTimeout` in interface `WidgetProvider`

### setQueryExpiration

    public void setQueryExpiration(long millis)

  Specified by:
    `setQueryExpiration` in interface `WidgetProvider`

### setEntryExpiration

    public void setEntryExpiration(long millis)

  Specified by:
    `setEntryExpiration` in interface `WidgetProvider`

### setFetchWidgetsOnDirectoryLookup

    public void setFetchWidgetsOnDirectoryLookup(boolean fetch)

  Specified by:
    `setFetchWidgetsOnDirectoryLookup` in interface `WidgetProvider`

### addDirectoryResult

    protected abstract void addDirectoryResult(WidgetQuery query)

  Abstract method for adding a directory query and submitting to the executor

  Parameters:
    `query` -

### addWidget

    protected abstract void addWidget(java.net.URL url)

  Abstract method for adding a widget url and submitting it to the executor

  Parameters:
    `url` -

### getWidget

    public Widget getWidget(java.net.URL url)

  Get widget (instance of WidgetFailure on failure)

  Specified by:
    `getWidget` in interface `WidgetProvider`
  Parameters:
    `url` -
  Returns:
    Widget

### getWidget

    public Widget getWidget(java.lang.String string)

### search

    public DirectoryQueryResult search(WidgetQuery q)

  Specified by:
    `search` in interface `WidgetProvider`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD