本文整理汇总了Java中com.caucho.hessian.io.Deserializer类的典型用法代码示例。如果您正苦于以下问题:Java Deserializer类的具体用法?Java Deserializer怎么用?Java Deserializer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Deserializer类属于com.caucho.hessian.io包,在下文中一共展示了Deserializer类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Override
public Deserializer getDeserializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(BigDecimal.class.isAssignableFrom(cl)) {
return bigDecimalDeserializer;
}
return null;
}
开发者ID:hailin0,项目名称:pagecache-parent,代码行数:8,代码来源:HessionBigDecimalSerializerFactory.java
示例2: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Override
public Deserializer getDeserializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(SoftReference.class.isAssignableFrom(cl)) {
return beanDeserializer;
}
return null;
}
开发者ID:hailin0,项目名称:pagecache-parent,代码行数:8,代码来源:HessionSoftReferenceSerializerFactory.java
示例3: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Override
public Deserializer getDeserializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(BigDecimal.class.isAssignableFrom(cl)) {
return BIG_DECIMAL_DESERIALIZER;
}
return null;
}
开发者ID:qiujiayu,项目名称:AutoLoadCache,代码行数:8,代码来源:HessionBigDecimalSerializerFactory.java
示例4: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Override
public Deserializer getDeserializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(WeakReference.class.isAssignableFrom(cl)) {
return beanDeserializer;
}
return null;
}
开发者ID:qiujiayu,项目名称:AutoLoadCache,代码行数:8,代码来源:WeakReferenceSerializerFactory.java
示例5: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public Deserializer getDeserializer(Class cl)throws HessianProtocolException{
if(PersistentCollection.class.isAssignableFrom(cl)){
return new HibernateDeserializer(cl) ;
}
return super.getDeserializer(cl) ;
}
开发者ID:kane-chen,项目名称:dubbo-demo,代码行数:9,代码来源:HibernateSerializerFactory.java
示例6: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Override
public Deserializer getDeserializer(Class cls) throws HessianProtocolException {
Deserializer deserializer = null;
if (FaultDetail.class.isAssignableFrom(cls)) {
deserializer = new FaultDetailDeserialiser(cls, transcriptionParams);
}
return deserializer;
}
开发者ID:betfair,项目名称:cougar,代码行数:11,代码来源:FaultDetailSerialiserFactory.java
示例7: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
/**
* Returns a deserializer based on a string type.
*/
public Deserializer getDeserializer(String type)
throws HessianProtocolException
{
if (type == null || type.equals("")) {
return null;
}
if (!transcriptionParams.contains(TranscribableParams.MajorOnlyPackageNaming)) {
// look for vMajor
type = ClassnameCompatibilityMapper.toMajorOnlyPackaging(type);
}
return optimizedGetDeserializer(type);
}
开发者ID:betfair,项目名称:cougar,代码行数:18,代码来源:CougarSerializerFactory.java
示例8: optimizedGetDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
/**
* If a Cougar server response contains a class the client doesn't know about (which is legal and backwards compatible
* in cases) then the default behavior of Hessian is to perform a lookup, fail, throw an exception and log it.
* This has been measured at about 25 times slower than the happy path, and Hessian does not negatively cache 'misses',
* so this is a per-response slowdown. This implementation caches type lookup misses, and so eradicates the problem.
*/
private Deserializer optimizedGetDeserializer(String type)
throws HessianProtocolException {
if (missingTypes.contains(type)) {
return null;
}
Deserializer answer = super.getDeserializer(type);
if (answer == null) {
missingTypes.add(type);
}
return answer;
}
开发者ID:betfair,项目名称:cougar,代码行数:18,代码来源:CougarSerializerFactory.java
示例9: getDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Override
public Deserializer getDeserializer(Class cls) throws HessianProtocolException {
Deserializer deserializer = null;
if (cls != null && TranscribableEnum.class.isAssignableFrom(cls)) {
deserializer = new TranscribableEnumDeserializer(cls, transcriptionParams);
}
return deserializer;
}
开发者ID:betfair,项目名称:cougar,代码行数:12,代码来源:EnumSerialiserFactory.java
示例10: testDeserializerFound
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Test
public void testDeserializerFound() throws Exception {
CougarSerializerFactory factory = new CougarSerializerFactory(Collections.EMPTY_SET);
Deserializer deserializer = factory.getDeserializer(Integer.class.getName());
assertNotNull(deserializer);
Set<String> missingTypes = factory.getMissingTypes();
assertEquals(0, missingTypes.size());
}
开发者ID:betfair,项目名称:cougar,代码行数:9,代码来源:CougarSerializerFactoryTest.java
示例11: testNoDeserializerFound
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Test
public void testNoDeserializerFound() throws Exception {
CougarSerializerFactory factory = new CougarSerializerFactory(Collections.EMPTY_SET);
Deserializer deserializer = factory.getDeserializer(MISSING_TYPE_NAME);
assertNull(deserializer);
Set<String> missingTypes = factory.getMissingTypes();
assertEquals(1, missingTypes.size());
assertTrue(missingTypes.contains(MISSING_TYPE_NAME));
}
开发者ID:betfair,项目名称:cougar,代码行数:10,代码来源:CougarSerializerFactoryTest.java
示例12: testMissingTypeCacheHit
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
@Test
public void testMissingTypeCacheHit() throws Exception {
String presentType = getClass().getName();
CougarSerializerFactory factory = new CougarSerializerFactory(Collections.EMPTY_SET);
Deserializer deserializer = factory.getDeserializer(presentType);
assertNotNull(deserializer);
Set<String> missingTypes = factory.getMissingTypes();
missingTypes.add(presentType);
deserializer = factory.getDeserializer(presentType);
assertNull(deserializer);
}
开发者ID:betfair,项目名称:cougar,代码行数:13,代码来源:CougarSerializerFactoryTest.java
示例13: addDeserializer
import com.caucho.hessian.io.Deserializer; //导入依赖的package包/类
public static void addDeserializer(Class<?> cl, Deserializer deserializer) {
extFactory.addDeserializer(cl, deserializer);
}
开发者ID:5waynewang,项目名称:commons-jkit,代码行数:4,代码来源:Hessian2Serialization.java
注:本文中的com.caucho.hessian.io.Deserializer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论