org.rhq.plugins.platform.content.yum
Class YumServer

java.lang.Object
  extended by org.rhq.plugins.platform.content.yum.YumServer

public class YumServer
extends Object

Provides a bare-bones http server for yum requests. It is designed to be a non-concurrent server to ensure that requests are handled one at a tiem. This is neccessary because the server caches the local metadata files. A concurrent server would either duplicate the work required (separate files per thread) to construct the local metadata or each thread would step-on the shared metadata files. Either way, a concurrent server should be sufficient for a single client.

Author:
jortel

Constructor Summary
YumServer()
           
 
Method Summary
 void cleanMetadata()
          Clean the cached metadata.
 void halt()
          Stop (halt/run=false) the server thread.
 boolean isStarted()
           
 void removeYumConfiguration()
          Remove the etc/yum.repos.d/ackbar.conf configuration file.
 void start(YumContext context)
          Starts the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YumServer

public YumServer()
Method Detail

start

public void start(YumContext context)
           throws Exception
Starts the server. This will initialize and start a server thread. If the server is already running, this request is treated as a restart. The server thread is stopped (run=false) and a new thread is initialized are started.

Parameters:
context - The server's context.
Throws:
Exception - On all errors.

halt

public void halt()
Stop (halt/run=false) the server thread. The request is ignored if the server thread isn't running.


isStarted

public boolean isStarted()

cleanMetadata

public void cleanMetadata()
Clean the cached metadata.


removeYumConfiguration

public void removeYumConfiguration()
Remove the etc/yum.repos.d/ackbar.conf configuration file.



Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.