sun.rmi.transport.Target Java Examples
The following examples show how to use
sun.rmi.transport.Target.
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: UnicastServerRef.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #2
Source File: UnicastServerRef.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #3
Source File: UnicastServerRef.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #4
Source File: UnicastServerRef.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #5
Source File: UnicastServerRef.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #6
Source File: UnicastServerRef.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #7
Source File: UnicastServerRef.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #8
Source File: UnicastServerRef.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #9
Source File: UnicastServerRef.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #10
Source File: UnicastServerRef.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #11
Source File: UnicastServerRef.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #12
Source File: UnicastServerRef.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #13
Source File: UnicastServerRef.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Export this object, create the skeleton and stubs for this * dispatcher. Create a stub based on the type of the impl, * initialize it with the appropriate remote reference. Create the * target defined by the impl, dispatcher (this) and stub. * Export that target via the Ref. */ public Remote exportObject(Remote impl, Object data, boolean permanent) throws RemoteException { Class<?> implClass = impl.getClass(); Remote stub; try { stub = Util.createProxy(implClass, getClientRef(), forceStubUse); } catch (IllegalArgumentException e) { throw new ExportException( "remote object implements illegal remote interface", e); } if (stub instanceof RemoteStub) { setSkeleton(impl); } Target target = new Target(impl, this, stub, ref.getObjID(), permanent); ref.exportObject(target); hashToMethod_Map = hashToMethod_Maps.get(implClass); return stub; }
Example #14
Source File: TCPTransport.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #15
Source File: MarshalOutputStream.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #16
Source File: MarshalOutputStream.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #17
Source File: MarshalOutputStream.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #18
Source File: TCPTransport.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #19
Source File: TCPTransport.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #20
Source File: MarshalOutputStream.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #21
Source File: TCPTransport.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #22
Source File: TCPTransport.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #23
Source File: MarshalOutputStream.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #24
Source File: MarshalOutputStream.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #25
Source File: TCPTransport.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #26
Source File: MarshalOutputStream.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #27
Source File: TCPTransport.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #28
Source File: TCPTransport.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }
Example #29
Source File: MarshalOutputStream.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Checks for objects that are instances of java.rmi.Remote * that need to be serialized as proxy objects. */ protected final Object replaceObject(Object obj) throws IOException { if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) { Target target = ObjectTable.getTarget((Remote) obj); if (target != null) { return target.getStub(); } } return obj; }
Example #30
Source File: TCPTransport.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Export the object so that it can accept incoming calls. */ public void exportObject(Target target) throws RemoteException { /* * Ensure that a server socket is listening, and count this * export while synchronized to prevent the server socket from * being closed due to concurrent unexports. */ synchronized (this) { listen(); exportCount++; } /* * Try to add the Target to the exported object table; keep * counting this export (to keep server socket open) only if * that succeeds. */ boolean ok = false; try { super.exportObject(target); ok = true; } finally { if (!ok) { synchronized (this) { decrementExportCount(); } } } }