KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > agent > io > DefaultMOOutput


1 /*_############################################################################
2   _##
3   _## SNMP4J-Agent - DefaultMOOutput.java
4   _##
5   _## Copyright (C) 2005-2007 Frank Fock (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21
22 package org.snmp4j.agent.io;
23
24 import java.io.*;
25
26 import org.snmp4j.smi.*;
27
28 public class DefaultMOOutput implements MOOutput {
29
30   private ObjectOutputStream os;
31
32   public DefaultMOOutput(ObjectOutputStream os) {
33     this.os = os;
34   }
35
36   public void writeContextBegin(Context context) throws IOException {
37     os.writeObject(context);
38   }
39
40   public void writeContextEnd(Context context) throws IOException {
41     os.writeObject(context);
42   }
43
44   public void writeIndexedVariables(IndexedVariables indexedVariables) throws
45       IOException {
46     os.writeObject(indexedVariables);
47   }
48
49   public void writeManagedObjectBegin(MOInfo mo) throws IOException {
50     os.writeObject(mo);
51   }
52
53   public void writeManagedObjectEnd(MOInfo mo) throws IOException {
54     os.writeObject(mo);
55   }
56
57   public void writeSequence(Sequence sequence) throws IOException {
58     os.writeObject(sequence);
59   }
60
61   public void writeVariable(Variable variable) throws IOException {
62     os.writeObject(variable);
63   }
64 }
65
Popular Tags