~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to src/core/NU-Sniffer/.svn/text-base/SnifferClientChannelSink.cs.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
 |
3
 
 | Copyright (c) 2007 Novell, Inc.
4
 
 | All Rights Reserved.
5
 
 |
6
 
 | This program is free software; you can redistribute it and/or
7
 
 | modify it under the terms of version 2 of the GNU General Public License as
8
 
 | published by the Free Software Foundation.
9
 
 |
10
 
 | This program is distributed in the hope that it will be useful,
11
 
 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 | GNU General Public License for more details.
14
 
 |
15
 
 | You should have received a copy of the GNU General Public License
16
 
 | along with this program; if not, contact Novell, Inc.
17
 
 |
18
 
 | To contact Novell about this file by physical or electronic mail,
19
 
 | you may find current contact information at www.novell.com 
20
 
 |
21
 
 | Author: Author: Rob
22
 
 |***************************************************************************/
23
 
 
24
 
 
25
 
using System;
26
 
using System.IO;
27
 
using System.Collections;
28
 
using System.Runtime.Remoting.Channels;
29
 
using System.Runtime.Remoting.Messaging;
30
 
using System.Text;
31
 
 
32
 
using Simias;
33
 
 
34
 
namespace Simias.Sniffer
35
 
{
36
 
        /// <summary>
37
 
        /// Sniffer Client Channel Sink
38
 
        /// </summary>
39
 
        public class SnifferClientChannelSink : IClientChannelSink
40
 
        {
41
 
                private static readonly ISimiasLog log = SimiasLogManager.GetLogger(typeof(SnifferClientChannelSink));
42
 
 
43
 
                private IClientChannelSink nextSink;
44
 
 
45
 
                /// <summary>
46
 
                /// Constructor
47
 
                /// </summary>
48
 
                /// <param name="nextSink">The next sink in the chain.</param>
49
 
                public SnifferClientChannelSink(IClientChannelSink nextSink)
50
 
                {
51
 
                        this.nextSink = nextSink;
52
 
                }
53
 
                
54
 
                #region IClientChannelSink Members
55
 
 
56
 
                void IClientChannelSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, out ITransportHeaders responseHeaders, out Stream responseStream)
57
 
                {
58
 
                        log.Debug("****** SNIFFER PROCESS [CLIENT] MESSAGE START ******");
59
 
 
60
 
                        log.Debug("Initiating Remote Call...{0}{1}", Environment.NewLine, SnifferMessage.ToString(msg));
61
 
 
62
 
                        try
63
 
                        {
64
 
                                nextSink.ProcessMessage(msg, requestHeaders, requestStream, out responseHeaders, out responseStream);
65
 
                        }
66
 
                        catch(Exception e)
67
 
                        {
68
 
                                log.Error(e, "Client Sink Process Exception");
69
 
 
70
 
                                throw e;
71
 
                        }
72
 
                        finally
73
 
                        {
74
 
                                log.Debug("******* SNIFFER PROCESS [CLIENT] MESSAGE END *******");
75
 
                        }
76
 
                }
77
 
 
78
 
                /// <summary>
79
 
                /// The next sink in the chain.
80
 
                /// </summary>
81
 
                IClientChannelSink IClientChannelSink.NextChannelSink
82
 
                {
83
 
                        get { return nextSink; }
84
 
                }
85
 
 
86
 
                /// <summary>
87
 
                /// Ignored
88
 
                /// </summary>
89
 
                /// <param name="msg"></param>
90
 
                /// <param name="headers"></param>
91
 
                /// <returns></returns>
92
 
                public Stream GetRequestStream(IMessage msg, ITransportHeaders headers)
93
 
                {
94
 
                        return null;
95
 
                }
96
 
 
97
 
                /// <summary>
98
 
                /// Ignored
99
 
                /// </summary>
100
 
                /// <param name="sinkStack"></param>
101
 
                /// <param name="msg"></param>
102
 
                /// <param name="headers"></param>
103
 
                /// <param name="stream"></param>
104
 
                public void AsyncProcessRequest(IClientChannelSinkStack sinkStack, IMessage msg, ITransportHeaders headers, Stream stream)
105
 
                {
106
 
                }
107
 
 
108
 
                /// <summary>
109
 
                /// Ignored
110
 
                /// </summary>
111
 
                /// <param name="sinkStack"></param>
112
 
                /// <param name="state"></param>
113
 
                /// <param name="headers"></param>
114
 
                /// <param name="stream"></param>
115
 
                void IClientChannelSink.AsyncProcessResponse(IClientResponseChannelSinkStack sinkStack, object state, ITransportHeaders headers, Stream stream)
116
 
                {
117
 
                }
118
 
 
119
 
                #endregion
120
 
 
121
 
                #region IChannelSinkBase Members
122
 
 
123
 
                /// <summary>
124
 
                /// Channel properties
125
 
                /// </summary>
126
 
                public IDictionary Properties
127
 
                {
128
 
                        get { return null; }
129
 
                }
130
 
 
131
 
                #endregion
132
 
        }
133
 
}