本文整理汇总了Java中com.caucho.hessian.io.AbstractHessianInput.addRef方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractHessianInput.addRef方法的具体用法?Java AbstractHessianInput.addRef怎么用?Java AbstractHessianInput.addRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.caucho.hessian.io.AbstractHessianInput
的用法示例。
在下文中一共展示了AbstractHessianInput.addRef方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readMap
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
int ref = in.addRef(null);
String direction = null, property = null, nullHandling = null;
boolean isIgnoreCase = false;
while (!in.isEnd()) {
String key = in.readString();
if (key.equals("value"))
direction = in.readString();
else
in.readString();
}
in.readMapEnd();
Object value = create(direction, property, isIgnoreCase, nullHandling);
in.setRef(ref, value);
return value;
}
示例2: readMap
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
String value = null;
while (!in.isEnd()) {
String key = in.readString();
if (key.equals("value"))
value = in.readString();
else
in.readObject();
}
in.readMapEnd();
Object object = create(value);
in.addRef(object);
return object;
}
示例3: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fieldNames) throws IOException {
String value = null;
for (int i = 0; i < fieldNames.length; i++) {
if ("value".equals(fieldNames[i]))
value = in.readString();
else
in.readObject();
}
Object object = create(value);
in.addRef(object);
return object;
}
示例4: readMap
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
public Object readMap(AbstractHessianInput in) throws IOException {
String name = null;
while (!in.isEnd()) {
String key = in.readString();
if (key.equals("name")) {
name = in.readString();
}
else {
in.readObject();
}
}
in.readMapEnd();
Object obj = transcriptionParams.contains(TranscribableParams.EnumsWrittenAsStrings) ? name : create(name);
in.addRef(obj);
return obj;
}
示例5: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
String[] fieldNames = (String[]) fields;
String name = null;
for (int i = 0; i < fieldNames.length; i++) {
if ("name".equals(fieldNames[i])) {
name = in.readString();
}
else {
in.readObject();
}
}
Object obj = create(name);
in.addRef(obj);
return obj;
}
示例6: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(final AbstractHessianInput in, Object[] fields) throws IOException {
try {
TranscriptionInput ti = new TranscriptionInput() {
@Override
public <T> T readObject(Parameter param, boolean client) throws Exception {
return (T) in.readObject();
}
};
int ref = in.addRef(null);
FaultDetail o = transcribe(ti);
in.setRef(ref, o);
return o;
}
catch (Exception e) {
throw new IOException(e);
}
}
示例7: readMap
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
int ref = in.addRef(null);
String key = in.readString();
if (StringUtils.isEmpty(key)) {
throw new IOException("Expected string comprising 'value'");
}
String value = in.readString();
Object obj = create(value);
in.readMapEnd();
in.setRef(ref, obj);
return obj;
}
示例8: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
String[] fieldNames = (String[]) fields;
int ref = in.addRef(null);
String value = null;
for (int i = 0; i < fieldNames.length; i++) {
String key = fieldNames[i];
if (key.equals("value")) {
value = in.readString();
} else {
in.readObject();
}
}
Object obj = create(value);
in.setRef(ref, value);
return obj;
}
示例9: readMap
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
int ref = in.addRef(null);
int page = 0, size = 0;
Sort sort = null;
while (!in.isEnd()) {
String key = in.readString();
if (key.equals("value")) {
page = in.readInt();
size = in.readInt();
sort = (Sort) in.readObject();
}
else {
in.readObject();
}
}
in.readMapEnd();
Object value = create(page, size, sort);
in.setRef(ref, value);
return value;
}
示例10: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
String[] fieldNames = (String[]) fields;
int ref = in.addRef(null);
int page = 0, size = 0;
Sort sort = null;
for (int i = 0; i < fieldNames.length; i++) {
String key = fieldNames[i];
if (key.equals("value")) {
page = in.readInt();
size = in.readInt();
sort = (Sort) in.readObject();
}
else {
in.readObject();
}
}
Object value = create(page, size, sort);
in.setRef(ref, value);
return value;
}
示例11: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
String[] fieldNames = (String[]) fields;
int ref = in.addRef(null);
String direction = null, property = null, nullHandling = null;
boolean isIgnoreCase = false;
for (int i = 0; i < fieldNames.length; i++) {
String key = fieldNames[i];
if (key.equals("value")) {
direction = in.readString();
property = in.readString();
isIgnoreCase = in.readBoolean();
nullHandling = in.readString();
}
else {
in.readObject();
}
}
Object value = create(direction, property, isIgnoreCase, nullHandling);
in.setRef(ref, value);
return value;
}
示例12: readMap
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readMap(AbstractHessianInput in) throws IOException {
int ref = in.addRef(null);
List<Order> orders = new ArrayList<>();
while (!in.isEnd()) {
String key = in.readString();
if (key.equals("value")) {
while (!in.isEnd()) {
orders.add((Order) in.readObject());
}
}
else {
in.readObject();
}
}
in.readMapEnd();
Object value = create(orders);
in.setRef(ref, value);
return value;
}
示例13: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException {
String[] fieldNames = (String[]) fields;
int ref = in.addRef(null);
List<Order> orders = new ArrayList<>();
for (int i = 0; i < fieldNames.length; i++) {
String key = fieldNames[i];
if (key.equals("value")) {
while (!in.isEnd()) {
orders.add((Order) in.readObject());
}
}
else {
in.readObject();
}
}
Object value = create(orders);
in.setRef(ref, value);
return value;
}
示例14: readLengthList
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
public Collection<Object> readLengthList(AbstractHessianInput in, int length)
throws IOException {
Collection<Object> list = this.createList();
in.addRef(list);
for (; length > 0; length--)
list.add(in.readObject());
return list;
}
示例15: readObject
import com.caucho.hessian.io.AbstractHessianInput; //导入方法依赖的package包/类
@Override
public Object readObject(final AbstractHessianInput in, Object[] fields) throws IOException {
try {
TranscriptionInput ti = new TranscriptionInput() {
@Override
public <T> T readObject(Parameter param, boolean client) throws Exception {
return (T) in.readObject();
}
};
int ref = in.addRef(null);
Constructor constructor = cls.getConstructor(TranscriptionInput.class, Set.class);
Object ret = constructor.newInstance(ti, transcriptionParams);
in.setRef(ref, ret);
return ret;
}
catch (Exception e) {
throw new IOException(e);
}
}