// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: addressbook.proto
package net.sina.com.pb;
public final class AddressBookProtos {
private AddressBookProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface PersonOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// required string name = 1;
boolean hasName();
String getName();
// required int32 id = 2;
boolean hasId();
int getId();
// optional string email = 3;
boolean hasEmail();
String getEmail();
// repeated .pb.Person.PhoneNumber phone = 4;
java.util.List<net.sina.com.pb.AddressBookProtos.Person.PhoneNumber>
getPhoneList();
net.sina.com.pb.AddressBookProtos.Person.PhoneNumber getPhone(int index);
int getPhoneCount();
java.util.List<? extends net.sina.com.pb.AddressBookProtos.Person.PhoneNumberOrBuilder>
getPhoneOrBuilderList();
net.sina.com.pb.AddressBookProtos.Person.PhoneNumberOrBuilder getPhoneOrBuilder(
int index);
}
public static final class Person extends
com.google.protobuf.GeneratedMessage
implements PersonOrBuilder {
// Use Person.newBuilder() to construct.
private Person(Builder builder) {
super(builder);
}
private Person(boolean noInit) {}
private static final Person defaultInstance;
public static Person getDefaultInstance() {
return defaultInstance;
}
public Person getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return net.sina.com.pb.AddressBookProtos.internal_static_pb_Person_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return net.sina.com.pb.AddressBookProtos.internal_static_pb_Person_fieldAccessorTable;
}
public enum PhoneType
implements com.google.protobuf.ProtocolMessageEnum {
MOBILE(0, 0),
HOME(1, 1),
WORK(2, 2),
;
public static final int MOBILE_VALUE = 0;
public static final int HOME_VALUE = 1;
public static final int WORK_VALUE = 2;
public final int getNumber() { return value; }
public static PhoneType valueOf(int value) {
switch (value) {
case 0: return MOBILE;
case 1: return HOME;
case 2: return WORK;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<PhoneType>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<PhoneType>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<PhoneType>() {
public PhoneType findValueByNumber(int number) {
return PhoneType.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return net.sina.com.pb.AddressBookProtos.Person.getDescriptor().getEnumTypes().get(0);
}
private static final PhoneType[] VALUES = {
MOBILE, HOME, WORK,
};
public static PhoneType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private PhoneType(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:pb.Person.PhoneType)
}
public interface PhoneNumberOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// required string number = 1;
boolean hasNumber();
String getNumber();
// optional .pb.Person.PhoneType type = 2 [default = HOME];
boolean hasType();
net.sina.com.pb.AddressBookProtos.Person.PhoneType getType();
}
public static final class PhoneNumber extends
com.google.protobuf.GeneratedMessage
implements PhoneNumberOrBuilder {
// Use PhoneNumber.newBuilder() to construct.
private PhoneNumber(Builder builder) {
super(builder);
}
private PhoneNumber(boolean noInit) {}
private static final PhoneNumber defaultInstance;
public static PhoneNumber getDefaultInstance() {
return defaultInstance;
}
public PhoneNumber getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return net.sina.com.pb.AddressBookProtos.internal_static_pb_Person_PhoneNumber_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return net.sina.com.pb.AddressBookProtos.internal_static_pb_Person_PhoneNumber_fieldAccessorTable;
}
private int bitField0_;
// required string number = 1;
public static final int NUMBER_FIELD_NUMBER = 1;
private java.lang.Object number_;
public boolean hasNumber() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public String getNumber() {
java.lang.Object ref = number_;
if (ref instanceof String) {
return (String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
number_ = s;
}
return s;
}
}
private com.google.protobuf.ByteString getNumberBytes() {
java.lang.Object ref = number_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
number_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional .pb.Person.PhoneType type = 2 [default = HOME];
public static final int TYPE_FIELD_NUMBER = 2;
private net.sina.com.pb.AddressBookProtos.Person.PhoneType type_;
public boolean hasType() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
public net.sina.com.pb.AddressBookProtos.Person.PhoneType getType() {
return type_;
}
private void initFields() {
number_ = "";
type_ = net.sina.com.pb.AddressBookProtos.Person.PhoneType.HOME;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
if (!hasNumber()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getNumberBytes());
}
没有合适的资源?快使用搜索试试~ 我知道了~
利用spring整合jersey和Protobuf,搭建REST web服务
共132个文件
class:44个
py:30个
jar:20个
4星 · 超过85%的资源 需积分: 17 237 下载量 34 浏览量
2012-05-24
17:24:31
上传
评论
收藏 15.62MB ZIP 举报
温馨提示
利用spring整合了Jersey和Protobuf,搭建了一个简单的Rest web service的工程,仅当作学习; 客户端是用python写的一个简单工程;
资源推荐
资源详情
资源评论
收起资源包目录
利用spring整合jersey和Protobuf,搭建REST web服务 (132个子文件)
python-proto2.cc 56KB
python_descriptor.cc 12KB
python_protobuf.cc 3KB
AddressBookProtos$Person$Builder.class 19KB
AddressBookProtos$Person$Builder.class 19KB
AddressBookProtos$AddressBook$Builder.class 16KB
AddressBookProtos$AddressBook$Builder.class 16KB
AddressBookProtos$Person.class 13KB
AddressBookProtos$Person.class 13KB
AddressBookProtos$Person$PhoneNumber$Builder.class 12KB
AddressBookProtos$Person$PhoneNumber$Builder.class 12KB
AddressBookProtos$Person$PhoneNumber.class 11KB
AddressBookProtos$Person$PhoneNumber.class 11KB
AddressBookProtos$AddressBook.class 10KB
AddressBookProtos$AddressBook.class 10KB
AddressBookResource.class 5KB
AddressBookResource.class 5KB
RestWsDemo.class 4KB
RestWsDemo.class 4KB
AddressBookProtos.class 4KB
AddressBookProtos.class 4KB
CreatePerson.class 4KB
CreatePerson.class 4KB
AddressBookProtos$Person$PhoneType.class 4KB
AddressBookProtos$Person$PhoneType.class 4KB
ProtobufMessageBodyWriter.class 4KB
ProtobufMessageBodyWriter.class 4KB
ProtobufMessageBodyReader.class 3KB
ProtobufMessageBodyReader.class 3KB
AddressBookStore.class 3KB
AddressBookStore.class 3KB
AddressBookProtos$1.class 3KB
AddressBookProtos$1.class 3KB
StudentServiceImpl.class 3KB
StudentServiceImpl.class 3KB
AddressBookProtos$Person$PhoneType$1.class 1KB
AddressBookProtos$Person$PhoneType$1.class 1KB
Student.class 1KB
Student.class 1KB
AddressBookProtos$PersonOrBuilder.class 1KB
AddressBookProtos$PersonOrBuilder.class 1KB
AddressBookProtos$AddressBookOrBuilder.class 864B
AddressBookProtos$AddressBookOrBuilder.class 864B
AddressBookProtos$Person$PhoneNumberOrBuilder.class 597B
AddressBookProtos$Person$PhoneNumberOrBuilder.class 597B
StudentService.class 549B
StudentService.class 549B
.classpath 546B
python_descriptor.h 3KB
python_protobuf.h 2KB
spring-2.5.6.jar 2.81MB
jersey-bundle-1.13-b01.jar 1.41MB
spring-context-3.0.0.RC3.jar 640KB
jersey-server-1.13-b01.jar 585KB
spring-beans-3.0.0.RC3.jar 538KB
jersey-core-1.13-b01.jar 451KB
protobuf-java-2.4.1.jar 440KB
log4j-1.2.14.jar 359KB
spring-web-3.0.0.RC3.jar 351KB
spring-core-3.0.0.RC3.jar 349KB
spring-aop-3.0.0.RC3.jar 317KB
spring-expression-3.0.0.RC3.jar 153KB
jersey-client-1.13-b01.jar 128KB
jersey-servlet-1.12.jar 122KB
commons-logging-1.1.1.jar 59KB
spring-asm-3.0.0.RC3.jar 52KB
jsr311-api-1.1.1.jar 45KB
asm-3.3.jar 43KB
jersey-spring-1.12.jar 17KB
aopalliance-1.0.jar 4KB
AddressBookProtos.java 71KB
RestWsDemo.java 4KB
AddressBookResource.java 2KB
CreatePerson.java 2KB
AddressBookStore.java 2KB
StudentServiceImpl.java 2KB
ProtobufMessageBodyWriter.java 2KB
ProtobufMessageBodyReader.java 1KB
Student.java 668B
StudentService.java 397B
index.jsp 430B
index.jsp 430B
org.eclipse.jdt.core.prefs 238B
org.maven.ide.eclipse.prefs 211B
.project 541B
.project 364B
pom.properties 123B
more_messages.proto 2KB
more_extensions.proto 2KB
addressbook.proto 503B
addressbook.proto 503B
addressbook.proto 503B
addressbook.proto 503B
reflection_test.py 97KB
descriptor_pb2.py 53KB
python_message.py 39KB
test_util.py 26KB
decoder.py 25KB
encoder.py 25KB
descriptor.py 22KB
共 132 条
- 1
- 2
yangfanchao
- 粉丝: 1
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页