Skip to content
Open
13 changes: 3 additions & 10 deletions README
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
由于开源站点因为安全问题被下掉,如果编译时出现找不到opensesame依赖情况的,请先手动下载https://github.com/alibaba/opensesame
本地install,这几天我们会把opensesame发到mavan中央仓库。

临时文档地址:http://alibaba.github.io/dubbo-doc-static/Developer+Guide-zh.htm

================================================================

Dubbo is a distributed service framework enpowers applications with service import/export capability with high performance RPC.

It's composed of three kernel parts:
Expand All @@ -17,7 +10,7 @@ Registry: a service directory framework for service registration and service eve

For more, please refer to:

http://code.alibabatech.com/wiki/display/dubbo
http://dubbo.io

================================================================
Quick Start
Expand Down Expand Up @@ -50,16 +43,16 @@ Source Building
wget http://www.apache.org/dist//maven/binaries/apache-maven-2.2.1-bin.tar.gz
tar zxvf apache-maven-2.2.1-bin.tar.gz
vi .bash_profile
- edit: export PATH=$PATH:~/apache-maven-2.2.1/bin
- append: export PATH=$PATH:~/apache-maven-2.2.1/bin
source .bash_profile

1. Checkout the dubbo source code:

cd ~
git clone https://github.com/alibaba/dubbo.git dubbo

git checkout -b dubbo-2.4.0
git checkout master
or: git checkout -b dubbo-2.4.0

2. Import the dubbo source code to eclipse project:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ private String createAdaptiveExtensionClassCode() {
if (i > 0) {
codeBuidler.append(", ");
}
codeBuidler.append(pts[i].getCanonicalName());
codeBuidler.append(ets[i].getCanonicalName());
}
}
codeBuidler.append(" {");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,9 @@ private static Class<?>[] desc2classArray(ClassLoader cl, String desc) throws Cl
*/
public static Method findMethodByMethodSignature(Class<?> clazz, String methodName, String[] parameterTypes)
throws NoSuchMethodException, ClassNotFoundException {
String signature = methodName;
String signature = clazz.getName() + "." + methodName;
if(parameterTypes != null && parameterTypes.length > 0){
signature = methodName + StringUtils.join(parameterTypes);
signature += StringUtils.join(parameterTypes);
}
Method method = Signature_METHODS_CACHE.get(signature);
if(method != null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/**
* @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
Expand All @@ -41,7 +40,7 @@ public ByteBufferBackedChannelBuffer(ByteBuffer buffer) {
writerIndex(capacity);
}

private ByteBufferBackedChannelBuffer(ByteBufferBackedChannelBuffer buffer) {
public ByteBufferBackedChannelBuffer(ByteBufferBackedChannelBuffer buffer) {
this.buffer = buffer.buffer;
capacity = buffer.capacity;
setIndex(buffer.readerIndex(), buffer.writerIndex());
Expand All @@ -55,12 +54,12 @@ public ChannelBufferFactory factory() {
}
}

@Override

public int capacity() {
return capacity;
}

@Override

public ChannelBuffer copy(int index, int length) {
ByteBuffer src;
try {
Expand All @@ -77,12 +76,12 @@ public ChannelBuffer copy(int index, int length) {
return new ByteBufferBackedChannelBuffer(dst);
}

@Override

public byte getByte(int index) {
return buffer.get(index);
}

@Override

public void getBytes(int index, byte[] dst, int dstIndex, int length) {
ByteBuffer data = buffer.duplicate();
try {
Expand All @@ -93,7 +92,7 @@ public void getBytes(int index, byte[] dst, int dstIndex, int length) {
data.get(dst, dstIndex, length);
}

@Override

public void getBytes(int index, ByteBuffer dst) {
ByteBuffer data = buffer.duplicate();
int bytesToCopy = Math.min(capacity() - index, dst.remaining());
Expand All @@ -105,7 +104,7 @@ public void getBytes(int index, ByteBuffer dst) {
dst.put(data);
}

@Override

public void getBytes(int index, ChannelBuffer dst, int dstIndex, int length) {
if (dst instanceof ByteBufferBackedChannelBuffer) {
ByteBufferBackedChannelBuffer bbdst = (ByteBufferBackedChannelBuffer) dst;
Expand All @@ -120,7 +119,7 @@ public void getBytes(int index, ChannelBuffer dst, int dstIndex, int length) {
}
}

@Override

public void getBytes(int index, OutputStream out, int length) throws IOException {
if (length == 0) {
return;
Expand All @@ -138,31 +137,31 @@ public void getBytes(int index, OutputStream out, int length) throws IOException
}
}

@Override

public boolean isDirect() {
return buffer.isDirect();
}

@Override

public void setByte(int index, int value) {
buffer.put(index, (byte) value);
}

@Override

public void setBytes(int index, byte[] src, int srcIndex, int length) {
ByteBuffer data = buffer.duplicate();
data.limit(index + length).position(index);
data.put(src, srcIndex, length);
}

@Override

public void setBytes(int index, ByteBuffer src) {
ByteBuffer data = buffer.duplicate();
data.limit(index + src.remaining()).position(index);
data.put(src);
}

@Override

public void setBytes(int index, ChannelBuffer src, int srcIndex, int length) {
if (src instanceof ByteBufferBackedChannelBuffer) {
ByteBufferBackedChannelBuffer bbsrc = (ByteBufferBackedChannelBuffer) src;
Expand All @@ -177,7 +176,7 @@ public void setBytes(int index, ChannelBuffer src, int srcIndex, int length) {
}
}

@Override

public ByteBuffer toByteBuffer(int index, int length) {
if (index == 0 && length == capacity()) {
return buffer.duplicate();
Expand All @@ -187,7 +186,7 @@ public ByteBuffer toByteBuffer(int index, int length) {
}
}

@Override

public int setBytes(int index, InputStream in, int length) throws IOException {
int readBytes = 0;

Expand Down Expand Up @@ -227,17 +226,17 @@ public int setBytes(int index, InputStream in, int length) throws IOException {
return readBytes;
}

@Override

public byte[] array() {
return buffer.array();
}

@Override

public boolean hasArray() {
return buffer.hasArray();
}

@Override

public int arrayOffset() {
return buffer.arrayOffset();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/**
* @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
Expand Down Expand Up @@ -68,80 +67,80 @@ public void ensureWritableBytes(int minWritableBytes) {
buffer = newBuffer;
}

@Override

public int capacity() {
return buffer.capacity();
}

@Override

public ChannelBuffer copy(int index, int length) {
DynamicChannelBuffer copiedBuffer = new DynamicChannelBuffer(Math.max(length, 64), factory());
copiedBuffer.buffer = buffer.copy(index, length);
copiedBuffer.setIndex(0, length);
return copiedBuffer;
}

@Override

public ChannelBufferFactory factory() {
return factory;
}

@Override

public byte getByte(int index) {
return buffer.getByte(index);
}

@Override

public void getBytes(int index, byte[] dst, int dstIndex, int length) {
buffer.getBytes(index, dst, dstIndex, length);
}

@Override

public void getBytes(int index, ByteBuffer dst) {
buffer.getBytes(index, dst);
}

@Override

public void getBytes(int index, ChannelBuffer dst, int dstIndex, int length) {
buffer.getBytes(index, dst, dstIndex, length);
}

@Override

public void getBytes(int index, OutputStream dst, int length) throws IOException {
buffer.getBytes(index, dst, length);
}

@Override

public boolean isDirect() {
return buffer.isDirect();
}

@Override

public void setByte(int index, int value) {
buffer.setByte(index, value);
}

@Override

public void setBytes(int index, byte[] src, int srcIndex, int length) {
buffer.setBytes(index, src, srcIndex, length);
}

@Override

public void setBytes(int index, ByteBuffer src) {
buffer.setBytes(index, src);
}

@Override

public void setBytes(int index, ChannelBuffer src, int srcIndex, int length) {
buffer.setBytes(index, src, srcIndex, length);
}

@Override

public int setBytes(int index, InputStream src, int length) throws IOException {
return buffer.setBytes(index, src, length);
}

@Override

public ByteBuffer toByteBuffer(int index, int length) {
return buffer.toByteBuffer(index, length);
}
Expand Down Expand Up @@ -176,17 +175,17 @@ public int writeBytes(InputStream in, int length) throws IOException {
return super.writeBytes(in, length);
}

@Override

public byte[] array() {
return buffer.array();
}

@Override

public boolean hasArray() {
return buffer.hasArray();
}

@Override

public int arrayOffset() {
return buffer.arrayOffset();
}
Expand Down
Loading