C# Класс CSJ2K.j2k.util.FacilityManager

This class manages common facilities for multi-threaded environments, It can register different facilities for each thread, and also a default one, so that they can be referred by static methods, while possibly having different ones for different threads. Also a default facility exists that is used for threads for which no particular facility has been registerd registered.

Currently the only kind of facilities managed is MsgLogger.

An example use of this class is if 2 instances of a decoder are running in different threads and the messages of the 2 instances should be separated.

The default MsgLogger is a StreamMsgLogger that uses System.out as the 'out' stream and System.err as the 'err' stream, and a line width of 78. This can be changed using the registerMsgLogger() method.

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getMsgLogger ( ) : IMsgLogger

Returns the MsgLogger registered with the current thread (the thread that calls this method). If the current thread has no registered MsgLogger then the default message logger is returned.

Приватные методы

Метод Описание
FacilityManager ( ) : System

Описание методов

getMsgLogger() публичный статический Метод

Returns the MsgLogger registered with the current thread (the thread that calls this method). If the current thread has no registered MsgLogger then the default message logger is returned.
public static getMsgLogger ( ) : IMsgLogger
Результат IMsgLogger