com.alibaba.dubbo.rpc.support.Type Java Examples
The following examples show how to use
com.alibaba.dubbo.rpc.support.Type.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompatibleFilterFilterTest.java From dubbox with Apache License 2.0 | 6 votes |
@Test public void testInvokerNonJsonEnumSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #2
Source File: CompatibleFilterFilterTest.java From dubbo3 with Apache License 2.0 | 6 votes |
@Test public void testInvokerJsonPojoSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&serialization=json"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #3
Source File: CompatibleFilterFilterTest.java From dubbo3 with Apache License 2.0 | 6 votes |
@Test public void testInvokerNonJsonEnumSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #4
Source File: CompatibleFilterFilterTest.java From dubbox-hystrix with Apache License 2.0 | 6 votes |
@Test public void testInvokerNonJsonEnumSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #5
Source File: CompatibleFilterFilterTest.java From dubbox-hystrix with Apache License 2.0 | 6 votes |
@Test public void testInvokerJsonPojoSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&serialization=json"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #6
Source File: CompatibleFilterFilterTest.java From dubbox with Apache License 2.0 | 6 votes |
@Test public void testInvokerJsonPojoSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&serialization=json"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #7
Source File: CompatibleFilterFilterTest.java From dubbox with Apache License 2.0 | 6 votes |
@Test public void testInvokerNonJsonEnumSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #8
Source File: CompatibleFilterFilterTest.java From dubbox with Apache License 2.0 | 6 votes |
@Test public void testInvokerJsonPojoSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&serialization=json"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #9
Source File: CompatibleFilterFilterTest.java From dubbo-2.6.5 with Apache License 2.0 | 6 votes |
@Test public void testInvokerNonJsonEnumSerialization() { invocation = mock(Invocation.class); given(invocation.getMethodName()).willReturn("enumlength"); given(invocation.getParameterTypes()).willReturn(new Class<?>[]{Type[].class}); given(invocation.getArguments()).willReturn(new Object[]{"hello"}); invoker = mock(Invoker.class); given(invoker.isAvailable()).willReturn(true); given(invoker.getInterface()).willReturn(DemoService.class); RpcResult result = new RpcResult(); result.setValue("High"); given(invoker.invoke(invocation)).willReturn(result); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1"); given(invoker.getUrl()).willReturn(url); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #10
Source File: CompatibleFilterFilterTest.java From dubbo-2.6.5 with Apache License 2.0 | 6 votes |
@Test public void testInvokerJsonPojoSerialization() { invocation = mock(Invocation.class); given(invocation.getMethodName()).willReturn("enumlength"); given(invocation.getParameterTypes()).willReturn(new Class<?>[]{Type[].class}); given(invocation.getArguments()).willReturn(new Object[]{"hello"}); invoker = mock(Invoker.class); given(invoker.isAvailable()).willReturn(true); given(invoker.getInterface()).willReturn(DemoService.class); RpcResult result = new RpcResult(); result.setValue("High"); given(invoker.invoke(invocation)).willReturn(result); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&serialization=json"); given(invoker.getUrl()).willReturn(url); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #11
Source File: CompatibleFilterFilterTest.java From dubbox with Apache License 2.0 | 6 votes |
@Test public void testInvokerJsonPojoSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1&serialization=json"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #12
Source File: CompatibleFilterFilterTest.java From dubbox with Apache License 2.0 | 6 votes |
@Test public void testInvokerNonJsonEnumSerialization() { invocation = EasyMock.createMock(Invocation.class); EasyMock.expect(invocation.getMethodName()).andReturn("enumlength").anyTimes(); EasyMock.expect(invocation.getParameterTypes()).andReturn(new Class<?>[] { Type[].class }).anyTimes(); EasyMock.expect(invocation.getArguments()).andReturn(new Object[] { "hello" }).anyTimes(); EasyMock.replay(invocation); invoker = EasyMock.createMock(Invoker.class); EasyMock.expect(invoker.isAvailable()).andReturn(true).anyTimes(); EasyMock.expect(invoker.getInterface()).andReturn(DemoService.class).anyTimes(); RpcResult result = new RpcResult(); result.setValue("High"); EasyMock.expect(invoker.invoke(invocation)).andReturn(result).anyTimes(); URL url = URL.valueOf("test://test:11/test?group=dubbo&version=1.1"); EasyMock.expect(invoker.getUrl()).andReturn(url).anyTimes(); EasyMock.replay(invoker); Result filterResult = compatibleFilter.invoke(invoker, invocation); assertEquals(Type.High, filterResult.getValue()); }
Example #13
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public CustomArgument(Type type, String name) { super(); this.type = type; this.name = name; }
Example #14
Source File: CustomArgument.java From dubbo3 with Apache License 2.0 | 4 votes |
public CustomArgument(Type type, String name) { super(); this.type = type; this.name = name; }
Example #15
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public Type getType() { return type; }
Example #16
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public void setType(Type type) { this.type = type; }
Example #17
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public void setType(Type type) { this.type = type; }
Example #18
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public Type getType() { return type; }
Example #19
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public CustomArgument(Type type, String name) { super(); this.type = type; this.name = name; }
Example #20
Source File: CustomArgument.java From dubbo3 with Apache License 2.0 | 4 votes |
public void setType(Type type) { this.type = type; }
Example #21
Source File: CustomArgument.java From dubbo3 with Apache License 2.0 | 4 votes |
public Type getType() { return type; }
Example #22
Source File: CustomArgument.java From dubbo-2.6.5 with Apache License 2.0 | 4 votes |
public CustomArgument(Type type, String name) { super(); this.type = type; this.name = name; }
Example #23
Source File: CustomArgument.java From dubbox-hystrix with Apache License 2.0 | 4 votes |
public void setType(Type type) { this.type = type; }
Example #24
Source File: CustomArgument.java From dubbox-hystrix with Apache License 2.0 | 4 votes |
public Type getType() { return type; }
Example #25
Source File: CustomArgument.java From dubbox-hystrix with Apache License 2.0 | 4 votes |
public CustomArgument(Type type, String name) { super(); this.type = type; this.name = name; }
Example #26
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public void setType(Type type) { this.type = type; }
Example #27
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public Type getType() { return type; }
Example #28
Source File: CustomArgument.java From dubbox with Apache License 2.0 | 4 votes |
public CustomArgument(Type type, String name) { super(); this.type = type; this.name = name; }
Example #29
Source File: CustomArgument.java From dubbo-2.6.5 with Apache License 2.0 | 4 votes |
public void setType(Type type) { this.type = type; }
Example #30
Source File: CustomArgument.java From dubbo-2.6.5 with Apache License 2.0 | 4 votes |
public Type getType() { return type; }