test_class.declarator: protocol = ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension()
test_class.modifier: private
test_class.original_string: private Protocol protocol = ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
test_class.type: Protocol
test_class.var_name: protocol
test_class.declarator: proxy = ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension()
test_class.modifier: private
test_class.original_string: private ProxyFactory proxy = ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
test_class.type: ProxyFactory
test_class.var_name: proxy
test_class.declarator: availablePort = NetUtils.getAvailablePort()
test_class.original_string: int availablePort = NetUtils.getAvailablePort();
test_class.type: int
test_class.var_name: availablePort
test_class.file: dubbo-rpc/dubbo-rpc-rmi/src/test/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocolTest.java
test_class.identifier: RmiProtocolTest
test_case.body: @Test
      public void testRmiProtocol() throws Exception {
          {
              DemoService service = new DemoServiceImpl();
              Exporter<?> rpcExporter = protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("rmi://127.0.0.1:" + availablePort + "/TestService")));
  
              service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("rmi://127.0.0.1:" + availablePort + "/TestService")));
              assertEquals(service.getSize(null), -1);
              assertEquals(service.getSize(new String[]{"", "", ""}), 3);
              Object result = service.invoke("rmi://127.0.0.1:" + availablePort + "/TestService", "invoke");
              assertEquals("rmi://127.0.0.1:" + availablePort + "/TestService:invoke", result);
  
              rpcExporter.unexport();
          }
  
          {
              int port = NetUtils.getAvailablePort();
              RemoteService remoteService = new RemoteServiceImpl();
              Exporter<?> rpcExporter = protocol.export(proxy.getInvoker(remoteService, RemoteService.class, URL.valueOf("rmi://127.0.0.1:" + port + "/remoteService")));
  
              remoteService = proxy.getProxy(protocol.refer(RemoteService.class, URL.valueOf("rmi://127.0.0.1:" + port + "/remoteService")));
              remoteService.getThreadName();
              for (int i = 0; i < 100; i++) {
                  String say = remoteService.sayHello("abcd");
                  assertEquals("hello abcd@" + RemoteServiceImpl.class.getName(), say);
              }
              rpcExporter.unexport();
          }
      }
test_case.class_method_signature: RmiProtocolTest.testRmiProtocol()
test_case.full_signature: @Test public void testRmiProtocol()
test_case.identifier: testRmiProtocol
test_case.invocations: export getInvoker valueOf getProxy refer valueOf assertEquals getSize assertEquals getSize invoke assertEquals unexport getAvailablePort export getInvoker valueOf getProxy refer valueOf getThreadName sayHello assertEquals getName unexport
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRmiProtocol()
focal_class.declarator: DEFAULT_PORT = 1099
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_PORT = 1099;
focal_class.type: int
focal_class.var_name: DEFAULT_PORT
focal_class.file: dubbo-rpc/dubbo-rpc-rmi/src/main/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java
focal_class.identifier: RmiProtocol
focal_class.class_method_signature: RmiProtocol.RmiProtocol()
focal_class.full_signature: public  RmiProtocol()
focal_class.identifier: RmiProtocol
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  RmiProtocol()
focal_class.class_method_signature: RmiProtocol.getDefaultPort()
focal_class.full_signature: @Override public int getDefaultPort()
focal_class.identifier: getDefaultPort
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getDefaultPort()
focal_class.class_method_signature: RmiProtocol.doExport(final T impl, Class<T> type, URL url)
focal_class.full_signature: @Override protected Runnable doExport(final T impl, Class<T> type, URL url)
focal_class.identifier: doExport
focal_class.modifiers: @Override protected
focal_class.parameters: (final T impl, Class<T> type, URL url)
focal_class.return: Runnable
focal_class.signature: Runnable doExport(final T impl, Class<T> type, URL url)
focal_class.class_method_signature: RmiProtocol.doRefer(final Class<T> serviceType, final URL url)
focal_class.full_signature: @Override @SuppressWarnings("unchecked") protected T doRefer(final Class<T> serviceType, final URL url)
focal_class.identifier: doRefer
focal_class.modifiers: @Override @SuppressWarnings("unchecked") protected
focal_class.parameters: (final Class<T> serviceType, final URL url)
focal_class.return: T
focal_class.signature: T doRefer(final Class<T> serviceType, final URL url)
focal_class.class_method_signature: RmiProtocol.getErrorCode(Throwable e)
focal_class.full_signature: @Override protected int getErrorCode(Throwable e)
focal_class.identifier: getErrorCode
focal_class.modifiers: @Override protected
focal_class.parameters: (Throwable e)
focal_class.return: int
focal_class.signature: int getErrorCode(Throwable e)
focal_class.class_method_signature: RmiProtocol.createExporter(T impl, Class<?> type, URL url, boolean isGeneric)
focal_class.full_signature: private RmiServiceExporter createExporter(T impl, Class<?> type, URL url, boolean isGeneric)
focal_class.identifier: createExporter
focal_class.modifiers: private
focal_class.parameters: (T impl, Class<?> type, URL url, boolean isGeneric)
focal_class.return: RmiServiceExporter
focal_class.signature: RmiServiceExporter createExporter(T impl, Class<?> type, URL url, boolean isGeneric)
focal_class.superclass: extends AbstractProxyProtocol
focal_method.body: public RmiProtocol() {
          super(RemoteAccessException.class, RemoteException.class);
      }
focal_method.class_method_signature: RmiProtocol.RmiProtocol()
focal_method.full_signature: public  RmiProtocol()
focal_method.identifier: RmiProtocol
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.signature:  RmiProtocol()