1 48 49 package com.caucho.hessian.io; 50 51 import java.util.HashMap ; 52 53 56 public class ExtSerializerFactory extends AbstractSerializerFactory { 57 private HashMap _serializerMap = new HashMap (); 58 private HashMap _deserializerMap = new HashMap (); 59 60 66 public void addSerializer(Class cl, Serializer serializer) 67 { 68 _serializerMap.put(cl, serializer); 69 } 70 71 77 public void addDeserializer(Class cl, Deserializer deserializer) 78 { 79 _deserializerMap.put(cl, deserializer); 80 } 81 82 89 public Serializer getSerializer(Class cl) 90 throws HessianProtocolException 91 { 92 return (Serializer) _serializerMap.get(cl); 93 } 94 95 102 public Deserializer getDeserializer(Class cl) 103 throws HessianProtocolException 104 { 105 return (Deserializer) _deserializerMap.get(cl); 106 } 107 } 108 | Popular Tags |