|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.nava.informa.utils.ChannelRegistry
public class ChannelRegistry
This class can be used as central repository for storing a collection of channel objects and maintaining them (by specifying update intervals).
| Field Summary | |
|---|---|
static int |
DEFAULT_ACCEPT_NR_ERRORS
|
| Constructor Summary | |
|---|---|
ChannelRegistry(ChannelBuilderIF builder)
Constructor for a new ChannelRegistry object, the new items found by scanning the are created using the given builder. |
|
| Method Summary | |
|---|---|
void |
activateChannel(ChannelIF channel,
int interval)
Activates a channel and looks for new items for the given channel. |
ChannelIF |
addChannel(ChannelIF channel,
boolean active,
int interval)
Given a stand-alone Channel (i.e. |
ChannelIF |
addChannel(URL url,
Collection<CategoryIF> categories,
int interval,
boolean active)
Adds one new channel object in the given category to the registry. |
ChannelIF |
addChannel(URL url,
int interval,
boolean active)
Adds one new channel object (instantiated with the help of the given URL from where the channel can be retrieved from) to the registry. |
void |
deactivateChannel(ChannelIF channel)
Deactivates a channel, no more updates are made. |
int |
getAcceptNrOfErrors()
|
ChannelIF |
getChannel(long id)
|
ChannelGroupIF |
getChannelGroup()
|
Collection |
getChannels()
Gets all the channels in the registry. |
long |
getScheduledUpdateTime(ChannelIF channel)
Gets the scheduled time of the next channel update. |
UpdateChannelInfo |
getUpdateInfo(ChannelIF channel)
|
boolean |
isActiveChannel(ChannelIF channel)
Returns wether the channel update task is still active or not. |
void |
removeChannel(ChannelIF channel)
Removes a channel from the registry. |
void |
setAcceptNrOfErrors(int acceptNrOfErrors)
Set number of channel parser errors acceptable after channel is not longer automatically updated. |
void |
setChannelGroup(ChannelGroupIF channels)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_ACCEPT_NR_ERRORS
| Constructor Detail |
|---|
public ChannelRegistry(ChannelBuilderIF builder)
builder.
builder - The ChannelBuilderIF to use for creating news items.| Method Detail |
|---|
public ChannelIF addChannel(URL url,
int interval,
boolean active)
url - - the URL where the channel news can be retrieved.interval - - time in seconds between update retrieval.active - - wether regular updates should be executed.
public ChannelIF addChannel(URL url,
Collection<CategoryIF> categories,
int interval,
boolean active)
url - - the URL where the channel news can be retrieved.categories - - the categories to which this channel should be
added to (collection of CategoryIF objects).interval - - time in seconds between update retrieval.active - - wether regular updates should be executed.
public ChannelIF addChannel(ChannelIF channel,
boolean active,
int interval)
channel - - Fully realized Channelactive - - Same as aboveinterval - - Same as above
public void activateChannel(ChannelIF channel,
int interval)
channel - The ChannelIF to scan for updatesinterval - Difference between channel updates in secondspublic ChannelIF getChannel(long id)
public Collection getChannels()
public ChannelGroupIF getChannelGroup()
public void setChannelGroup(ChannelGroupIF channels)
public void removeChannel(ChannelIF channel)
channel - The ChannelIF object to remove.public void deactivateChannel(ChannelIF channel)
public boolean isActiveChannel(ChannelIF channel)
public UpdateChannelInfo getUpdateInfo(ChannelIF channel)
public long getScheduledUpdateTime(ChannelIF channel)
channel - The ChannelIF to retrieve information for.
public int getAcceptNrOfErrors()
public void setAcceptNrOfErrors(int acceptNrOfErrors)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||