1 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 |