Package java.rmi

Examples of java.rmi.Remote


     *            RMIIIOPServerImpl has not been exported yet.
     **/
    public Remote toStub() throws IOException {
  // javax.rmi.CORBA.Stub stub =
  //    (javax.rmi.CORBA.Stub) PortableRemoteObject.toStub(this);
  final Remote stub = PortableRemoteObject.toStub(this);
  // java.lang.System.out.println("NON CONNECTED STUB " + stub);
  // org.omg.CORBA.ORB orb =
  //    org.omg.CORBA.ORB.init((String[])null, (Properties)null);
  // stub.connect(orb);
  // java.lang.System.out.println("CONNECTED STUB " + stub);
View Full Code Here


            return obj;
        }

        if (obj instanceof Remote) {
            Remote remoteObj = (Remote)obj;
            Tie theTie = Util.getTie(remoteObj);
            if (theTie != null) {
                try {
                    theTie.orb();
                } catch (SystemException okay) {
View Full Code Here

     * Load an RMI-IIOP Stub.  This is used in PortableRemoteObject.narrow.
     */
    public static Remote loadStub (org.omg.CORBA.Object narrowFrom,
                                   Class narrowTo)
    {
        Remote result = null;

        try {
            // Get the codebase from the delegate to use when loading
            // the new stub, if possible...
            String codebase = null;
View Full Code Here

    }

    public Remote findService(String host, String port, String svcName) throws RMIHostException,
        RMIHostRuntimeException {
        Registry registry;
        Remote remoteService = null;
        host = (host == null || host.length() <= 0) ? "localhost" : host;
        int portNumber = (port == null || port.length() <= 0) ? RMI_DEFAULT_PORT : Integer.decode(port);

        try {
            registry = LocateRegistry.getRegistry(host, portNumber);
View Full Code Here

    }

    public Remote findService(String host, String port, String svcName) throws RMIHostException,
        RMIHostRuntimeException {
        Registry registry;
        Remote remoteService = null;
        host = (host == null || host.length() <= 0) ? "localhost" : host;
        int portNumber = (port == null || port.length() <= 0) ? RMI_DEFAULT_PORT : Integer.decode(port);

        try {
            // Requires permission java.net.SocketPermission "host:port", "connect,accept,resolve"
View Full Code Here

        // binding.setURI(uri.toString());

        wire = service.getRuntimeWire(binding);
        Interface serviceInterface = service.getInterfaceContract().getInterface();

        Remote rmiProxy = createRmiService(serviceInterface);

        try {

            rmiHost.registerService(binding.getServiceName(), getPort(binding.getPort()), rmiProxy);
View Full Code Here

    private final String host;

    private static RemoteJMeterEngine getEngine(String h) throws MalformedURLException, RemoteException,
            NotBoundException {
       final String name = "//" + h + "/" + RemoteJMeterEngineImpl.JMETER_ENGINE_RMI_NAME; // $NON-NLS-1$ $NON-NLS-2$
       Remote remobj = Naming.lookup(name);
       if (remobj instanceof RemoteJMeterEngine){
           final RemoteJMeterEngine rje = (RemoteJMeterEngine) remobj;
           if (remobj instanceof RemoteObject){
               RemoteObject robj = (RemoteObject) remobj;
               System.out.println("Using remote object: "+robj.getRef().remoteToString());
View Full Code Here

    private final String host;

    private static RemoteJMeterEngine getEngine(String h) throws MalformedURLException, RemoteException,
            NotBoundException {
       final String name = "//" + h + "/" + RemoteJMeterEngineImpl.JMETER_ENGINE_RMI_NAME; // $NON-NLS-1$ $NON-NLS-2$
       Remote remobj = Naming.lookup(name);
       if (remobj instanceof RemoteJMeterEngine){
           final RemoteJMeterEngine rje = (RemoteJMeterEngine) remobj;
           if (remobj instanceof RemoteObject){
               RemoteObject robj = (RemoteObject) remobj;
               System.out.println("Using remote object: "+robj.getRef().remoteToString());
View Full Code Here

          if (logger.isDebugEnabled()) {
            logger.debug("Creating JAX-RPC proxy for JAX-RPC port [" + this.portQName +
                "], using port interface [" + portInterface.getName() + "]");
          }
          Remote remoteObj = service.getPort(this.portQName, portInterface);

          if (logger.isDebugEnabled()) {
            Class serviceInterface = getServiceInterface();
            if (serviceInterface != null) {
              boolean isImpl = serviceInterface.isInstance(remoteObj);
              logger.debug("Using service interface [" + serviceInterface.getName() + "] for JAX-RPC port [" +
                  this.portQName + "] - " + (!isImpl ? "not" : "") + " directly implemented");
            }
          }

          if (!(remoteObj instanceof Stub)) {
            throw new RemoteLookupFailureException("Port stub of class [" + remoteObj.getClass().getName() +
                "] is not a valid JAX-RPC stub: it does not implement interface [javax.xml.rpc.Stub]");
          }
          Stub stub = (Stub) remoteObj;

          // Apply properties to JAX-RPC stub.
View Full Code Here

   * @see #getPortStub()
   * @see #doInvoke(org.aopalliance.intercept.MethodInvocation, java.rmi.Remote)
   * @see #performJaxRpcCall(org.aopalliance.intercept.MethodInvocation, javax.xml.rpc.Service)
   */
  protected Object doInvoke(MethodInvocation invocation) throws Throwable {
    Remote stub = getPortStub();
    try {
      if (stub != null) {
        // JAX-RPC port stub available -> traditional RMI stub invocation.
        if (logger.isTraceEnabled()) {
          logger.trace("Invoking operation '" + invocation.getMethod().getName() + "' on JAX-RPC port stub");
View Full Code Here

TOP

Related Classes of java.rmi.Remote

Copyright © 2018 www.massapicom. 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.