nimbus (1.2.4) | 2018-01-25 20:02 |
nimbus-sample (1.2.4) | 2018-01-26 17:06 |
jp.ossc.nimbus.service.aop.interceptor.servlet.AccessJournalInterceptorServiceは、サーブレットへのアクセスジャーナルを取得するInterceptor実装サービスです。
このサービスは、複合的なサービスで、以下のサービスを下位サービスとして使用します。
下位サービスインタフェース | 用途 |
jp.ossc.nimbus.service.journal.Journal | ジャーナルを出力する。 |
jp.ossc.nimbus.service.journal.editorfinder.EditorFinder | ジャーナルを編集するjp.ossc.nimbus.service.journal.JournalEditorを見つける。 |
jp.ossc.nimbus.service.context.Context | リクエストIDを取得するコンテキスト。 |
jp.ossc.nimbus.service.sequence.Sequence | リクエストIDを発番する。 |
以下に簡単なサービス定義を示します。
- <?xml version="1.0" encoding="Shift_JIS"?>
- <!DOCTYPE server PUBLIC
- "-//Nimbus//DTD Nimbus 1.0//JA"
- "http://nimbus.sourceforge.jp/dtd/nimbus-service_1_0.dtd">
- <server>
- <manager>
- <!-- アクセスジャーナルを取得するInterceptorサービス -->
- <service name="AccessJournalInterceptor"
- code="jp.ossc.nimbus.service.aop.interceptor.servlet.AccessJournalInterceptorService">
- <attribute name="JournalServiceName">#Journal</attribute>
- <depends>Journal</depends>
- </service>
- <!-- 以下はジャーナルサービス定義 -->
- <service name="Journal"
- code="jp.ossc.nimbus.service.journal.ThreadManagedJournalService">
- <attribute name="EditorFinderName">#JournalEditorFinder</attribute>
- <attribute name="WritableElementKey">AccessJournal</attribute>
- <attribute name="CategoryServiceNames">#JournalCategory</attribute>
- <depends>JournalEditorFinder</depends>
- <depends>JournalCategory</depends>
- </service>
- <service name="JournalCategory"
- code="jp.ossc.nimbus.service.writer.SimpleCategoryService">
- <attribute name="MessageWriterServiceName">#JournalWriter</attribute>
- <attribute name="WritableRecordFactoryServiceName">#JournalWritableRecordFactory</attribute>
- <attribute name="CategoryServiceNames">#JournalCategory</attribute>
- <depends>JournalWriter</depends>
- <depends>JournalWritableRecordFactory</depends>
- </service>
- <service name="JournalWritableRecordFactory"
- code="jp.ossc.nimbus.service.writer.PropertyWritableRecordFactoryService">
- <attribute name="FormatKeyMapping">
- DATE=AccessJournal.StartTime
- REQUEST_ID=AccessJournal.RequestID
- CLIENT=AccessJournal.JournalRecords.Request[0].JournalRecords.ServletRequest[0].RemoteAddress
- SESSION_ID=AccessJournal.JournalRecords.Request[0].JournalRecords.ServletRequest[0].RequestSessionID
- REQUEST_URL=AccessJournal.JournalRecords.Request[0].JournalRecords.ServletRequest[0].RequestURL
- REQUEST_HEADERS=AccessJournal.JournalRecords.Request[0].JournalRecords.ServletRequest[0].HTTPHeaders
- REQUEST_PARAMS=AccessJournal.JournalRecords.Request[0].JournalRecords.ServletRequest[0].Parameters
- RESPONSE_STATUS=AccessJournal.JournalRecords.Response[0].JournalRecords.ServletResponse[0].Status
- PERFORMANCE=AccessJournal.Performance
- </attribute>
- <attribute name="Format">""%DATE%","%REQUEST_ID%","%CLIENT%","%SESSION_ID%","%REQUEST_URL%","%REQUEST_HEADERS%","%REQUEST_PARAMS%","%RESPONSE_STATUS%","%PERFORMANCE%""</attribute>
- <attribute name="ImplementServiceNames">
- DATE=#DateElement
- </attribute>
- <depends>
- <service name="DateElement"
- code="jp.ossc.nimbus.service.writer.DateElement"
- instance="factory">
- <attribute name="Format">yyyy/MM/dd HH:mm:ss.SSS</attribute>
- </service>
- </depends>
- </service>
- <service name="JournalWriter"
- code="jp.ossc.nimbus.service.writer.ConsoleWriterService"/>
- <service name="AccessJournalEditorFinder"
- code="jp.ossc.nimbus.service.journal.editorfinder.ObjectMappedEditorFinderService">
- <attribute name="EditorProperties">
- java.lang.Object=#MutableObjectJournalEditor
- [Ljava.lang.String;=#ObjectArrayJournalEditor
- java.util.Enumeration=#EnumerationJournalEditor
- javax.servlet.http.HttpServletRequest=#HttpServletRequestJournalEditor
- javax.servlet.http.HttpServletResponse=#HttpServletResponseJournalEditor
- jp.ossc.nimbus.service.journal.RequestJournal=#RequestJournalEditor
- </attribute>
- <depends>MutableObjectJournalEditor</depends>
- <depends>ObjectArrayJournalEditor</depends>
- <depends>EnumerationJournalEditor</depends>
- <depends>HttpServletRequestJournalEditor</depends>
- <depends>HttpServletResponseJournalEditor</depends>
- <depends>RequestJournalEditor</depends>
- </service>
- <service name="RequestJournalEditor"
- code="jp.ossc.nimbus.service.journal.editor.SimpleRequestMapJournalEditorService">
- <attribute name="OutputRequestId">true</attribute>
- <attribute name="OutputStartTime">true</attribute>
- <attribute name="OutputRecords">true</attribute>
- <attribute name="OutputEndTime">false</attribute>
- <attribute name="OutputPerformance">true</attribute>
- </service>
- <service name="MutableObjectJournalEditor"
- code="jp.ossc.nimbus.service.journal.editor.MutableObjectJournalEditorService"/>
- <service name="ObjectArrayJournalEditor"
- code="jp.ossc.nimbus.service.journal.editor.ObjectArrayJournalEditorService">
- <attribute name="StartValueDelimiter">'</attribute>
- <attribute name="EndValueDelimiter">'</attribute>
- </service>
- <service name="EnumerationJournalEditor"
- code="jp.ossc.nimbus.service.journal.editor.EnumerationJournalEditorService"/>
- <service name="HttpServletRequestJournalEditor"
- code="jp.ossc.nimbus.service.journal.editor.HttpServletRequestMapJournalEditorService">
- <attribute name="OutputRemoteAddress">true</attribute>
- <attribute name="OutputRemotePort">false</attribute>
- <attribute name="OutputRemoteHost">false</attribute>
- <attribute name="OutputLocalAddress">false</attribute>
- <attribute name="OutputLocalPort">false</attribute>
- <attribute name="OutputLocalName">false</attribute>
- <attribute name="OutputServerName">false</attribute>
- <attribute name="OutputServerPort">false</attribute>
- <attribute name="OutputProtocol">false</attribute>
- <attribute name="OutputScheme">false</attribute>
- <attribute name="OutputLocale">false</attribute>
- <attribute name="OutputContentType">false</attribute>
- <attribute name="OutputContentLength">false</attribute>
- <attribute name="OutputCharacterEncoding">false</attribute>
- <attribute name="OutputAttributes">false</attribute>
- <attribute name="SecretAttributes"></attribute>
- <attribute name="EnabledAttributes"></attribute>
- <attribute name="OutputParameters">true</attribute>
- <attribute name="SecretParameters">:Header.password</attribute>
- <attribute name="EnabledParameters"></attribute>
- <attribute name="OutputRequestURL">true</attribute>
- <attribute name="OutputRequestURI">false</attribute>
- <attribute name="OutputServletPath">false</attribute>
- <attribute name="OutputContextPath">false</attribute>
- <attribute name="OutputPathInfo">false</attribute>
- <attribute name="OutputPathTranslated">false</attribute>
- <attribute name="OutputQueryString">false</attribute>
- <attribute name="OutputSessionID">true</attribute>
- <attribute name="OutputIsRequestedSessionIdFromCookie">false</attribute>
- <attribute name="OutputIsRequestedSessionIdFromURL">false</attribute>
- <attribute name="OutputMethod">false</attribute>
- <attribute name="OutputAuthType">false</attribute>
- <attribute name="OutputRemoteUser">false</attribute>
- <attribute name="OutputUserPrincipal">false</attribute>
- <attribute name="OutputHeaders">true</attribute>
- <attribute name="SecretHeaders"></attribute>
- <attribute name="EnabledHeaders"></attribute>
- <attribute name="OutputCookies">false</attribute>
- <attribute name="SecretCookies"></attribute>
- <attribute name="EnabledCookies"></attribute>
- </service>
- <service name="HttpServletResponseJournalEditor"
- code="jp.ossc.nimbus.service.journal.editor.HttpServletResponseWrapperMapJournalEditorService">
- <attribute name="OutputBufferSize">false</attribute>
- <attribute name="OutputCharacterEncoding">false</attribute>
- <attribute name="OutputContentType">false</attribute>
- <attribute name="OutputLocale">false</attribute>
- <attribute name="OutputIsCommitted">false</attribute>
- <attribute name="OutputContent">true</attribute>
- <attribute name="OutputContentLength">false</attribute>
- <attribute name="OutputCookies">false</attribute>
- <attribute name="EnabledCookies"></attribute>
- <attribute name="SecretCookies"></attribute>
- <attribute name="OutputHeaders">false</attribute>
- <attribute name="EnabledHeaders"></attribute>
- <attribute name="SecretHeaders"></attribute>
- <attribute name="OutputIsSentError">false</attribute>
- <attribute name="OutputRedirectLocation">false</attribute>
- <attribute name="OutputStatus">true</attribute>
- <attribute name="OutputStatusMessage">false</attribute>
- <attribute name="OutputStatusMessage">false</attribute>
- </service>
- </manager>
- </server>