コード例 #1
0
 /**
  * {@inheritDoc}
  *
  * @see com.dinstone.jrpc.endpoint.ServiceImporter#importService(java.lang.Class,
  *     java.lang.String, int)
  */
 @Override
 public <T> T importService(Class<T> sic, String group, int timeout) {
   try {
     ServiceProxy<T> wrapper = serviceStubFactory.create(sic, group, timeout, null);
     referenceBinding.bind(wrapper, endpointConfig);
     return wrapper.getInstance();
   } catch (Exception e) {
     throw new RuntimeException("can't import service", e);
   }
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  *
  * @see com.dinstone.jrpc.endpoint.ServiceImporter#destroy()
  */
 @Override
 public void destroy() {
   if (serviceStubFactory != null) {
     serviceStubFactory.destroy();
   }
 }