本文整理汇总了Java中com.caucho.hessian.io.Serializer类的典型用法代码示例。如果您正苦于以下问题:Java Serializer类的具体用法?Java Serializer怎么用?Java Serializer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Serializer类属于com.caucho.hessian.io包,在下文中一共展示了Serializer类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeObject
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
/**
* Writes any object to the output stream.
*/
public void writeObject(Object object)
throws IOException
{
if (object == null) {
writeNull();
return;
}
Serializer serializer;
serializer = _serializerFactory.getSerializer(object.getClass());
serializer.writeObject(object, this);
}
示例2: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see com.caucho.hessian.io.SerializerFactory#getSerializer(java.lang.Class)
*/
@Override
public Serializer getSerializer ( Class cl ) throws HessianProtocolException {
Serializer serializer = super.getSerializer(cl);
if ( serializer instanceof WriteReplaceSerializer ) {
return UnsafeSerializer.create(cl);
}
return serializer;
}
示例3: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getSerializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(BigDecimal.class.isAssignableFrom(cl)) {
return bigDecimalSerializer;
}
return null;
}
示例4: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getSerializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(SoftReference.class.isAssignableFrom(cl)) {
return beanSerializer;
}
return null;
}
示例5: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getSerializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(BigDecimal.class.isAssignableFrom(cl)) {
return BIG_DECIMAL_SERIALIZER;
}
return null;
}
示例6: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getSerializer(@SuppressWarnings("rawtypes") Class cl) throws HessianProtocolException {
if(WeakReference.class.isAssignableFrom(cl)) {
return beanSerializer;
}
return null;
}
示例7: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public Serializer getSerializer(Class cl) throws HessianProtocolException {
if (PersistentCollection.class.isAssignableFrom(cl)) {
return new HibernateSerializer();
}
return super.getSerializer(cl);
}
示例8: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getSerializer(Class cls) throws HessianProtocolException {
Serializer serializer = null;
if (FaultDetail.class.isAssignableFrom(cls)) {
serializer = new FaultDetailSerialiser(transcriptionParams);
}
return serializer;
}
示例9: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getSerializer(Class cls) throws HessianProtocolException {
Serializer serializer = null;
if (Transcribable.class.isAssignableFrom(cls)) {
serializer = new TranscribableSerialiser(transcriptionParams, client);
}
return serializer;
}
示例10: getSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getSerializer(Class cls) throws HessianProtocolException {
if (cls != null && TranscribableEnum.class.isAssignableFrom(cls)) {
return new TranscribableEnumSerializer(cls, transcriptionParams);
}
return null;
}
示例11: getObjectSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
@Override
public Serializer getObjectSerializer() {
return this;
}
示例12: addSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
public static void addSerializer(Class<?> cl, Serializer serializer) {
extFactory.addSerializer(cl, serializer);
}
示例13: getObjectSerializer
import com.caucho.hessian.io.Serializer; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see com.caucho.hessian.io.SerializerFactory#getObjectSerializer(java.lang.Class)
*/
@Override
public Serializer getObjectSerializer ( Class<?> cl ) throws HessianProtocolException {
return super.getObjectSerializer(cl);
}