dk.netarkivet.common.distribute
Class Channels

java.lang.Object
  extended by dk.netarkivet.common.distribute.Channels

public class Channels
extends java.lang.Object

This singleton class is in charge of giving out the correct channels.


Method Summary
static ChannelID[] getAllArchives_ALL_BAs()
          Returns ALL_BA channels for every known bitarchive.
static ChannelID[] getAllArchives_ANY_BAs()
          Returns ANY_BA channels for every known bitarchive.
static ChannelID[] getAllArchives_BAMONs()
          Returns BAMON channels for every known bitarchive.
static ChannelID getAllBa()
          Returns the topic that all bitarchive machines on this locations listen on.
static ChannelID getAnyBa()
          Returns the channel where exactly one of all the bitarchive machines at this location will get the message.
static ChannelID getAnyHighpriorityHaco()
          Returns the queue which is used by the scheduler to send doOneCrawl to Harvest Controllers of high priority (selective harvests).
static ChannelID getAnyLowpriorityHaco()
          Returns the queue which is used by the scheduler to send doOneCrawl to Harvest Controllers of low priority (snapshot harvests).
static ChannelID getBaMonForInstitution(java.lang.String institution)
          Given an institution name, returns the BAMON queue to which batch jobs must be sent in order to run them on that institutions bitarchive.
static ChannelID getError()
          Returns the queue on which to put errors which are not handled elsewhere.
static ChannelID getTheArcrepos()
          Returns the queue on which all messages to the ArcRepository are sent.
static ChannelID getTheBamon()
          Returns the queue for sending messages to bitarchive monitors.
static ChannelID getTheIndexServer()
          Returns the queue for sending messages to the IndexServer application.
static ChannelID getTheSched()
          Returns the queue on which HarvestControllers reply with status messages to the HarvestScheduler.
static ChannelID getThisHaco()
          Returns the one-per-HACO queue on which HaCo receives replies from the arcrepository.
static ChannelID getThisIndexClient()
          Returns the queue for getting responses from the IndexServer application.
(package private) static void reset()
          Reset the instance to re-read the settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTheSched

public static ChannelID getTheSched()
Returns the queue on which HarvestControllers reply with status messages to the HarvestScheduler.

Returns:
the ChannelID object for the queue on which HarvestControllers reply with status messages to the HarvestScheduler

getAnyHighpriorityHaco

public static ChannelID getAnyHighpriorityHaco()
Returns the queue which is used by the scheduler to send doOneCrawl to Harvest Controllers of high priority (selective harvests).

Returns:
That channel (queue)

getAnyLowpriorityHaco

public static ChannelID getAnyLowpriorityHaco()
Returns the queue which is used by the scheduler to send doOneCrawl to Harvest Controllers of low priority (snapshot harvests).

Returns:
That channel (queue)

getThisHaco

public static ChannelID getThisHaco()
Returns the one-per-HACO queue on which HaCo receives replies from the arcrepository.

Returns:
the ChannelID object for this queue.

getTheArcrepos

public static ChannelID getTheArcrepos()
Returns the queue on which all messages to the ArcRepository are sent.

Returns:
the ChannelID object for this queue.

getAllArchives_BAMONs

public static final ChannelID[] getAllArchives_BAMONs()
                                               throws PermissionDenied
Returns BAMON channels for every known bitarchive.

Returns:
An array of BAMON channels - one per bitarchive
Throws:
PermissionDenied - if the Settings indicates that this is not an arcrepository application. For the moment, this is never checked, however.

getTheBamon

public static ChannelID getTheBamon()
Returns the queue for sending messages to bitarchive monitors.

Returns:
the ChannelID object for this queue.

getAllArchives_ALL_BAs

public static final ChannelID[] getAllArchives_ALL_BAs()
                                                throws PermissionDenied
Returns ALL_BA channels for every known bitarchive.

Returns:
An array of ALL_BA channels - one per bitarchive
Throws:
PermissionDenied - if the Settings indicates that this is not an arcrepository application. For the moment, this is never checked, however.

getAllBa

public static ChannelID getAllBa()
Returns the topic that all bitarchive machines on this locations listen on.

Returns:
A topic channel that reaches all local bitarchive machines

getAllArchives_ANY_BAs

public static final ChannelID[] getAllArchives_ANY_BAs()
                                                throws PermissionDenied
Returns ANY_BA channels for every known bitarchive.

Returns:
An array of ANY_BA channels - one per bitarchive
Throws:
PermissionDenied - if the Settings indicates that this is not an arcrepository application. For the moment, this is never checked, however.

getAnyBa

public static ChannelID getAnyBa()
Returns the channel where exactly one of all the bitarchive machines at this location will get the message.

Returns:
A queue channel that reaches one of the local bitarchive machines.

getError

public static ChannelID getError()
Returns the queue on which to put errors which are not handled elsewhere.

Returns:
the ChannelID object for this queue.

getBaMonForInstitution

public static ChannelID getBaMonForInstitution(java.lang.String institution)
                                        throws ArgumentNotValid
Given an institution name, returns the BAMON queue to which batch jobs must be sent in order to run them on that institutions bitarchive.

Parameters:
institution - the institution
Returns:
the channel
Throws:
ArgumentNotValid - if the institution is unknown

getTheIndexServer

public static ChannelID getTheIndexServer()
Returns the queue for sending messages to the IndexServer application.

Returns:
the ChannelID object for this queue.

getThisIndexClient

public static ChannelID getThisIndexClient()
Returns the queue for getting responses from the IndexServer application.

Returns:
the ChannelID object for this queue.

reset

static void reset()
Reset the instance to re-read the settings. Only for use in tests.