本文整理汇总了Java中javax.rmi.CORBA.ValueHandlerMultiFormat类的典型用法代码示例。如果您正苦于以下问题:Java ValueHandlerMultiFormat类的具体用法?Java ValueHandlerMultiFormat怎么用?Java ValueHandlerMultiFormat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValueHandlerMultiFormat类属于javax.rmi.CORBA包,在下文中一共展示了ValueHandlerMultiFormat类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMaxStreamFormatVersion
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入依赖的package包/类
/**
* Returns the maximum stream format version supported by our
* ValueHandler.
*/
public static byte getMaxStreamFormatVersion() {
ValueHandler vh;
try {
vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
public ValueHandler run() throws Exception {
return Util.createValueHandler();
}
});
} catch (PrivilegedActionException e) {
throw new InternalError(e.getCause());
}
if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
return ORBConstants.STREAM_FORMAT_VERSION_1;
else
return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
示例2: getMaxStreamFormatVersion
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入依赖的package包/类
/**
* Returns the maximum stream format version supported by our
* ValueHandler.
*/
public static byte getMaxStreamFormatVersion() {
ValueHandler vh;
try {
vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
public ValueHandler run() throws Exception {
return Util.createValueHandler();
}
});
} catch (PrivilegedActionException e) {
throw new InternalError(e.getMessage());
}
if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
return ORBConstants.STREAM_FORMAT_VERSION_1;
else
return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
示例3: writeArray
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入依赖的package包/类
private void writeArray(Serializable array, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(); //d11638
// Write value_tag
int indirection = writeValueTag(mustChunk, true,
Util.getCodebase(clazz));
// Write repository ID
write_repositoryId(repIdStrs.createSequenceRepID(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, array, array);
// Write Value chunk
if (mustChunk) {
start_block();
end_flag--;
chunkedValueNestingLevel--;
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, array, streamFormatVersion);
} else
valueHandler.writeValue(parent, array);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}
示例4: getMaxStreamFormatVersion
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入依赖的package包/类
/**
* Returns the maximum stream format version supported by our
* ValueHandler.
*/
public static byte getMaxStreamFormatVersion() {
ValueHandler vh = Util.createValueHandler();
if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
return ORBConstants.STREAM_FORMAT_VERSION_1;
else
return ((ValueHandlerMultiFormat)vh).getMaximumStreamFormatVersion();
}
示例5: writeArray
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入依赖的package包/类
private void writeArray(Serializable array, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(orb); //d11638
// Write value_tag
int indirection = writeValueTag(mustChunk, true,
Util.getCodebase(clazz));
// Write repository ID
write_repositoryId(repIdStrs.createSequenceRepID(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, array, array);
// Write Value chunk
if (mustChunk) {
start_block();
end_flag--;
chunkedValueNestingLevel--;
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, array, streamFormatVersion);
} else
valueHandler.writeValue(parent, array);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}
示例6: writeRMIIIOPValueType
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入依赖的package包/类
private void writeRMIIIOPValueType(Serializable object, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(); //d11638
Serializable key = object;
// Allow the ValueHandler to call writeReplace on
// the Serializable (if the method is present)
object = valueHandler.writeReplace(key);
if (object == null) {
// Write null tag and return
write_long(0);
return;
}
if (object != key) {
if (valueCache != null && valueCache.containsKey(object)) {
writeIndirection(INDIRECTION_TAG, valueCache.getVal(object));
return;
}
clazz = object.getClass();
}
if (mustChunk || valueHandler.isCustomMarshaled(clazz)) {
mustChunk = true;
}
// Write value_tag
int indirection = writeValueTag(mustChunk, true, Util.getCodebase(clazz));
// Write rep. id
write_repositoryId(repIdStrs.createForJavaType(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, object, key);
if (mustChunk) {
// Write Value chunk
end_flag--;
chunkedValueNestingLevel--;
start_block();
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, object, streamFormatVersion);
} else
valueHandler.writeValue(parent, object);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}
示例7: writeRMIIIOPValueType
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入依赖的package包/类
private void writeRMIIIOPValueType(Serializable object, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(orb); //d11638
Serializable key = object;
// Allow the ValueHandler to call writeReplace on
// the Serializable (if the method is present)
object = valueHandler.writeReplace(key);
if (object == null) {
// Write null tag and return
write_long(0);
return;
}
if (object != key) {
if (valueCache != null && valueCache.containsKey(object)) {
writeIndirection(INDIRECTION_TAG, valueCache.getVal(object));
return;
}
clazz = object.getClass();
}
if (mustChunk || valueHandler.isCustomMarshaled(clazz)) {
mustChunk = true;
}
// Write value_tag
int indirection = writeValueTag(mustChunk, true, Util.getCodebase(clazz));
// Write rep. id
write_repositoryId(repIdStrs.createForJavaType(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, object, key);
if (mustChunk) {
// Write Value chunk
end_flag--;
chunkedValueNestingLevel--;
start_block();
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, object, streamFormatVersion);
} else
valueHandler.writeValue(parent, object);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}