⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpobject.java

📁 java 文件下载器。可自定义
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   RPObject.java

package org.gudy.azureus2.pluginsimpl.remote;

import java.io.Serializable;
import java.util.*;
import org.gudy.azureus2.core3.util.SystemTime;
import org.gudy.azureus2.pluginsimpl.remote.rpexceptions.RPObjectNoLongerExistsException;

// Referenced classes of package org.gudy.azureus2.pluginsimpl.remote:
//			RPException, RPReply, RPRequest, RPRequestDispatcher

public class RPObject
	implements Serializable
{

	protected static Map object_registry = new WeakHashMap();
	protected static Map object_registry_reverse = new WeakHashMap();
	protected static long next_key = (new Random(SystemTime.getCurrentTime())).nextLong();
	public Long _object_id;
	protected transient Object __delegate;
	protected transient RPRequestDispatcher _dispatcher;

	protected static RPObject _lookupLocal(Object key)
	{
		Map map = object_registry;
		JVM INSTR monitorenter ;
		RPObject res;
		res = (RPObject)object_registry.get(key);
		if (res != null)
			res._setLocal();
		return res;
		Exception exception;
		exception;
		throw exception;
	}

	public static RPObject _lookupLocal(long object_id)
	{
		Map map = object_registry;
		JVM INSTR monitorenter ;
		RPObject obj;
		Object res = object_registry_reverse.get(new Long(object_id));
		if (res == null)
			throw new RPObjectNoLongerExistsException();
		obj = (RPObject)object_registry.get(res);
		if (obj == null)
			throw new RPObjectNoLongerExistsException();
		return obj;
		Exception exception;
		exception;
		throw exception;
	}

	public RPObject()
	{
	}

	protected RPObject(Object key)
	{
		synchronized (object_registry)
		{
			RPObject existing = (RPObject)object_registry.get(key);
			if (existing != null)
			{
				_object_id = existing._object_id;
			} else
			{
				_object_id = new Long(next_key++);
				object_registry.put(key, this);
				object_registry_reverse.put(_object_id, key);
			}
		}
		__delegate = key;
		_setDelegate(__delegate);
	}

	public long _getOID()
	{
		return _object_id.longValue();
	}

	protected void _setDelegate(Object _delegate)
	{
		throw new RuntimeException((new StringBuilder()).append("you've got to implement this - ").append(_delegate).toString());
	}

	public Object _getDelegate()
	{
		return __delegate;
	}

	protected Object _fixupLocal()
		throws RPException
	{
		Object res = object_registry_reverse.get(_object_id);
		if (res == null)
		{
			throw new RPObjectNoLongerExistsException();
		} else
		{
			_setDelegate(res);
			return res;
		}
	}

	public void _setRemote(RPRequestDispatcher __dispatcher)
	{
		_dispatcher = __dispatcher;
	}

	protected RPRequestDispatcher getDispatcher()
	{
		return _dispatcher;
	}

	public RPReply _process(RPRequest request)
	{
		throw new RuntimeException((new StringBuilder()).append("you've got to implement this - ").append(request).toString());
	}

	public Object _setLocal()
	{
		throw new RuntimeException("you've got to implement this");
	}

	public void _refresh()
	{
		RPObject res = (RPObject)_dispatcher.dispatch(new RPRequest(this, "_refresh", null)).getResponse();
		_setDelegate(res);
	}

	public String _getName()
	{
		String str = getClass().getName();
		int dp = str.lastIndexOf('.');
		if (dp != -1)
			str = str.substring(dp + 1);
		if (str.startsWith("RP"))
			str = str.substring(2);
		return str;
	}

	public void notSupported()
	{
		throw new RuntimeException("RPObject:: method not supported");
	}

	public void notSupported(Object o)
	{
		throw new RuntimeException((new StringBuilder()).append("RPObject:: method not supported - ").append(o).toString());
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -