Examples of LipeRMIException


Examples of net.sf.lipermi.exception.LipeRMIException

  }
 
  @SuppressWarnings("unchecked") //$NON-NLS-1$
  private void exportObject(Class cInterface, Object objImplementation, String instanceId) throws LipeRMIException {
    if (!cInterface.isAssignableFrom(objImplementation.getClass()))
      throw new LipeRMIException(String.format("Class %s is not assignable from %s", objImplementation.getClass().getName(), cInterface.getName())); //$NON-NLS-1$

    for (RemoteInstance remoteInstance : exportedObjects.keySet()) {
      if ((remoteInstance.getInstanceId() == instanceId || (remoteInstance.getInstanceId() != null && remoteInstance.getInstanceId().equals(instanceId))) && remoteInstance.getClassName().equals(cInterface.getName())) {
        throw new LipeRMIException(String.format("Class %s already has a implementation class", cInterface.getName()));         //$NON-NLS-1$
      }
    }
   
    RemoteInstance remoteInstance = new RemoteInstance(instanceId, cInterface.getName());
    exportedObjects.put(remoteInstance, objImplementation);
View Full Code Here

Examples of net.sf.lipermi.exception.LipeRMIException

 
 
  public RemoteReturn delegateCall(RemoteCall remoteCall) throws LipeRMIException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException {
    Object implementator = exportedObjects.get(remoteCall.getRemoteInstance());
    if (implementator == null)
      throw new LipeRMIException(String.format("Class %s doesn't have implementation", remoteCall.getRemoteInstance().getClassName())); //$NON-NLS-1$

    RemoteReturn remoteReturn;

    Method implementationMethod = null;
   
View Full Code Here

Examples of net.sf.lipermi.exception.LipeRMIException

            remoteReturns.add(remoteReturn);
            remoteReturns.notifyAll();
          }
        }
        else
          throw new LipeRMIException("Unknown IRemoteMessage type"); //$NON-NLS-1$
      }
    } catch (Exception e) {
      try {
        socket.close();
      } catch (IOException e1) {}
View Full Code Here

Examples of net.sf.lipermi.exception.LipeRMIException

      }
    }
    while (socket.isConnected() && !bReturned);
   
    if (!socket.isConnected() && !bReturned)
      throw new LipeRMIException("Connection aborted"); //$NON-NLS-1$
   
    if (remoteReturn.isThrowing() && remoteReturn.getRet() instanceof Throwable)
      throw ((Throwable) remoteReturn.getRet()).getCause();
   
    if (remoteReturn.getRet() instanceof RemoteInstance) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.