gluu
公開メンバ関数 | 関数 | 非公開メンバ関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.xdi.oxauth.exception.GlobalExceptionHandler クラス
org.xdi.oxauth.exception.GlobalExceptionHandler の継承関係図
Inheritance graph
org.xdi.oxauth.exception.GlobalExceptionHandler 連携図
Collaboration graph

公開メンバ関数

ExceptionHandler getWrapped ()
 
void handle () throws FacesException
 

関数

 GlobalExceptionHandler (ExceptionHandler exception)
 

非公開メンバ関数

void performRedirect (ExternalContext externalContext, String viewId)
 

非公開変数類

ExceptionHandler wrapped
 

静的非公開変数類

static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class)
 

詳解

Created by eugeniuparvan on 8/29/17.

構築子と解体子

◆ GlobalExceptionHandler()

org.xdi.oxauth.exception.GlobalExceptionHandler.GlobalExceptionHandler ( ExceptionHandler  exception)
inlinepackage
25  {
26  this.wrapped = exception;
27  }
ExceptionHandler wrapped
Definition: GlobalExceptionHandler.java:23

関数詳解

◆ getWrapped()

ExceptionHandler org.xdi.oxauth.exception.GlobalExceptionHandler.getWrapped ( )
inline
30  {
31  return this.wrapped;
32  }
ExceptionHandler wrapped
Definition: GlobalExceptionHandler.java:23

◆ handle()

void org.xdi.oxauth.exception.GlobalExceptionHandler.handle ( ) throws FacesException
inline
34  {
35  final Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator();
36 
37  while (i.hasNext()) {
38  ExceptionQueuedEvent event = i.next();
39  ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();
40 
41  Throwable t = context.getException();
42  final FacesContext fc = FacesContext.getCurrentInstance();
43  final ExternalContext externalContext = fc.getExternalContext();
44  final ConfigurableNavigationHandler nav = (ConfigurableNavigationHandler) fc.getApplication().getNavigationHandler();
45  try {
46  log.error(t.getMessage(), t);
47  performRedirect(externalContext, "/error_service");
48  fc.renderResponse();
49  } finally {
50  i.remove();
51  }
52  }
53  getWrapped().handle();
54  }
void performRedirect(ExternalContext externalContext, String viewId)
Definition: GlobalExceptionHandler.java:56
ExceptionHandler getWrapped()
Definition: GlobalExceptionHandler.java:30
static final Logger log
Definition: GlobalExceptionHandler.java:21

◆ performRedirect()

void org.xdi.oxauth.exception.GlobalExceptionHandler.performRedirect ( ExternalContext  externalContext,
String  viewId 
)
inlineprivate
56  {
57  try {
58  externalContext.redirect(externalContext.getRequestContextPath() + viewId);
59  } catch (Exception e) {
60  log.error("Can't perform redirect to viewId: " + viewId, e);
61  }
62  }
static final Logger log
Definition: GlobalExceptionHandler.java:21

メンバ詳解

◆ log

final Logger org.xdi.oxauth.exception.GlobalExceptionHandler.log = LoggerFactory.getLogger(GlobalExceptionHandler.class)
staticprivate

◆ wrapped

ExceptionHandler org.xdi.oxauth.exception.GlobalExceptionHandler.wrapped
private

このクラス詳解は次のファイルから抽出されました: