Package jetbrains.mps.messages
Interface IMessageHandler
- 
- All Known Subinterfaces:
 IMessageList
- All Known Implementing Classes:
 ErrorsLoggingHandler,LogHandler
public interface IMessageHandlerInterface is a strategy for the IMessage handling 
- 
- 
Field Summary
Fields Modifier and Type Field Description static IMessageHandlerNULL_HANDLERNull-safe handler which does nothing 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default IMessageHandlercompose(IMessageHandler another)voidhandle(IMessage msg)default IMessageHandlerrestrict(MessageKind atLeastOfKind) 
 - 
 
- 
- 
Field Detail
- 
NULL_HANDLER
static final IMessageHandler NULL_HANDLER
Null-safe handler which does nothing 
 - 
 
- 
Method Detail
- 
compose
default IMessageHandler compose(@NotNull IMessageHandler another)
- Parameters:
 another- one more handler to pipe messages to- Returns:
 - composite message handler that pipes messages to both 
thisandanother. 
 
- 
restrict
default IMessageHandler restrict(@NotNull MessageKind atLeastOfKind)
- Parameters:
 atLeastOfKind- useMessageKind.ERRORto filter out warnings and info, useMessageKind.WARNINGto show errors and warnings only. Use ofMessageKind.INFORMATIONmakes no sense and effectively a no-op.- Returns:
 - a new handler that would receive messages of the specified or severer) kind only
 
 
 - 
 
 -