public interface

LogDestinations

com.microstrategy.web.objects.admin.serverconfig.LogDestinations

Class Overview

This interface represents the log destinations for an IServer. Note that any changes made to an editable log destination (like FileLogDestination) can be saved only using save(). For a given IServer, this object refers to all its log destinations. Thus, if one/more LogDestinations have been edited, they can be saved in a batch, using save(). Out of the possible log destination types, only two are editable. They are LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog. These destinations are represented by FileLogDestination. The collection methods on this interface (add/remove/get/elements/isEmpty/getItemByName/size/clear) only work on editable log destinations. . For log destinations of remaining types LogDestinationTypeDebugOutput and LogDestinationTypeSystemLog, there are seperate access methods (getDebugOutputDestination() and getSystemLogDestination()).

Summary

Public Methods
abstract LogDestination add(String name, int type)
Adds a new LogDestination with the name and type passed.
abstract void clear()
Clears the collection of editable log destinations.
abstract Enumeration elements()
Returns an enumeration of LogDestination objects.
abstract LogDestination get(int index)
Returns the log destination at the index passed.
abstract LogDestination getDebugOutputDestination()
Returns the non-editable LogDestination of type LogDestinationTypeDebugOutput.
abstract LogDestination getItemByName(String name)
Returns the log destination with the name passed.
abstract LogDestination getSystemLogDestination()
Returns the non-editable LogDestination of type LogDestinationTypeSystemLog.
abstract boolean isEmpty()
Conveys if the log destination collection is empty.
abstract LogDestination remove(int index)
Removes the log destination at the index passed.
abstract boolean remove(LogDestination dest)
Removes the log destination object passed.
abstract void save()
Commits all changes done to this collection.
abstract int size()
Returns the number of log destinations in this collection object.

Public Methods

public abstract LogDestination add (String name, int type)

Adds a new LogDestination with the name and type passed. The new log destination is only added to this local collection and is saved to IServer only after save() is called. Note that only editable destination types can be added i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog.

Parameters
name the name of the new destination.
type the type of destination.
Returns
  • LogDestination the newly created LogDestination.
Throws
IllegalArgumentException if a non-editable destination type is passed i.e. LogDestinationTypeDebugOutput and LogDestinationTypeSystemLog

public abstract void clear ()

Clears the collection of editable log destinations. The changes are not committed to IServer till save() is invoked.

public abstract Enumeration elements ()

Returns an enumeration of LogDestination objects. Note that the collection methods as this one only gives access to editable log destination types i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g. getDebugOutputDestination() and getSystemLogDestination()

Returns
  • Enumeration enumeration of editable destinations.

public abstract LogDestination get (int index)

Returns the log destination at the index passed. Note that the collection methods as this one only gives access to editable log destination types i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g. getDebugOutputDestination() and getSystemLogDestination()

Parameters
index index of the destination queried.
Returns
  • LogDestination the destination at the index passed.

public abstract LogDestination getDebugOutputDestination ()

Returns the non-editable LogDestination of type LogDestinationTypeDebugOutput.

Returns
  • LogDestination returns the debug output log destination.

public abstract LogDestination getItemByName (String name)

Returns the log destination with the name passed. Note that the collection methods as this one only gives access to editable log destination types i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g. getDebugOutputDestination() and getSystemLogDestination()

Parameters
name the name of the destination queried.
Returns
  • LogDestination The destination with the name passed.

public abstract LogDestination getSystemLogDestination ()

Returns the non-editable LogDestination of type LogDestinationTypeSystemLog.

Returns
  • LogDestination returns the system log destination.

public abstract boolean isEmpty ()

Conveys if the log destination collection is empty. Note that the collection methods as this one only consider editable log destination types i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog.

Returns
  • boolean True if there are no editable log destinations in this collection.

public abstract LogDestination remove (int index)

Removes the log destination at the index passed. If this is an existing log destination on IServer, the log destination is removed from IServer only after save() is called. Note that the collection methods as this one only gives access to editable log destination types i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g. getDebugOutputDestination() and getSystemLogDestination()

Parameters
index the index of the editable destination to remove.
Returns
  • LogDestination the removed log destination.

public abstract boolean remove (LogDestination dest)

Removes the log destination object passed. The object passed is only removed from the local collection and will be removed from IServer only when @link #save is called}. Also, note that the collection methods as this one only allows editable log destination types i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog.

Parameters
dest the destination to remove.
Returns
  • boolean True if the remove operation was successful.

public abstract void save ()

Commits all changes done to this collection. This includes adding/removing/clearing (editable) log destinations or changing their properties.

Throws
ServerConfigException If an error was encountered while saving the changes to IServer.

public abstract int size ()

Returns the number of log destinations in this collection object. Note that the collection methods as this one only considers editable log destination types i.e. LogDestinationTypeDiagnosticsLog and LogDestinationTypePerformanceLog.

Returns
  • int the number of editable log destinations.