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

📄 rpipfilter.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:   RPIPFilter.java

package org.gudy.azureus2.pluginsimpl.remote.ipfilter;

import java.io.File;
import org.gudy.azureus2.plugins.ipfilter.*;
import org.gudy.azureus2.pluginsimpl.remote.*;

// Referenced classes of package org.gudy.azureus2.pluginsimpl.remote.ipfilter:
//			RPIPRange

public class RPIPFilter extends RPObject
	implements IPFilter
{

	protected transient IPFilter delegate;
	public long last_update_time;
	public int number_of_ranges;
	public int number_of_blocked_ips;

	public static IPFilter create(IPFilter _delegate)
	{
		RPIPFilter res = (RPIPFilter)_lookupLocal(_delegate);
		if (res == null)
			res = new RPIPFilter(_delegate);
		return res;
	}

	protected RPIPFilter(IPFilter _delegate)
	{
		super(_delegate);
	}

	protected void _setDelegate(Object _delegate)
	{
		delegate = (IPFilter)_delegate;
		last_update_time = delegate.getLastUpdateTime();
		number_of_ranges = delegate.getNumberOfRanges();
		number_of_blocked_ips = delegate.getNumberOfBlockedIPs();
	}

	public Object _setLocal()
		throws RPException
	{
		return _fixupLocal();
	}

	public RPReply _process(RPRequest request)
	{
		String method;
		Object params[];
		method = request.getMethod();
		params = request.getParams();
		if (method.equals("createAndAddRange[String,String,String,boolean]"))
		{
			IPRange range = delegate.createAndAddRange((String)params[0], (String)params[1], (String)params[2], ((Boolean)params[3]).booleanValue());
			if (range == null)
			{
				return new RPReply(null);
			} else
			{
				RPIPRange rp_range = RPIPRange.create(range);
				return new RPReply(rp_range);
			}
		}
		if (method.equals("getRanges"))
		{
			IPRange ranges[] = delegate.getRanges();
			RPIPRange rp_ranges[] = new RPIPRange[ranges.length];
			for (int i = 0; i < ranges.length; i++)
				rp_ranges[i] = RPIPRange.create(ranges[i]);

			return new RPReply(rp_ranges);
		}
		if (!method.equals("save"))
			break MISSING_BLOCK_LABEL_188;
		delegate.save();
		return null;
		IPFilterException e;
		e;
		return new RPReply(e);
		if (method.equals("getInRangeAddressesAreAllowed"))
			return new RPReply(new Boolean(delegate.getInRangeAddressesAreAllowed()));
		if (method.equals("setInRangeAddressesAreAllowed[boolean]"))
		{
			delegate.setInRangeAddressesAreAllowed(((Boolean)params[0]).booleanValue());
			return null;
		}
		if (method.equals("isEnabled"))
			return new RPReply(new Boolean(delegate.isEnabled()));
		if (method.equals("setEnabled[boolean]"))
		{
			delegate.setEnabled(((Boolean)params[0]).booleanValue());
			return null;
		}
		if (method.equals("isInRange[String]"))
			return new RPReply(new Boolean(delegate.isInRange((String)params[0])));
		else
			throw new RPException((new StringBuilder()).append("Unknown method: ").append(method).toString());
	}

	public File getFile()
	{
		notSupported();
		return null;
	}

	public IPRange createRange(boolean this_session_only)
	{
		notSupported();
		return null;
	}

	public void addRange(IPRange range)
	{
		notSupported();
	}

	public IPRange createAndAddRange(String description, String start_ip, String end_ip, boolean this_session_only)
	{
		RPIPRange resp = (RPIPRange)_dispatcher.dispatch(new RPRequest(this, "createAndAddRange[String,String,String,boolean]", new Object[] {
			description, start_ip, end_ip, new Boolean(this_session_only)
		})).getResponse();
		resp._setRemote(_dispatcher);
		return resp;
	}

	public void removeRange(IPRange range)
	{
		notSupported();
	}

	public void reload()
		throws IPFilterException
	{
		notSupported();
	}

	public IPRange[] getRanges()
	{
		RPIPRange resp[] = (RPIPRange[])(RPIPRange[])_dispatcher.dispatch(new RPRequest(this, "getRanges", null)).getResponse();
		for (int i = 0; i < resp.length; i++)
			resp[i]._setRemote(_dispatcher);

		return resp;
	}

	public boolean isInRange(String IPAddress)
	{
		Boolean res = (Boolean)_dispatcher.dispatch(new RPRequest(this, "isInRange[String]", new Object[] {
			IPAddress
		})).getResponse();
		return res.booleanValue();
	}

	public IPBlocked[] getBlockedIPs()
	{
		notSupported();
		return null;
	}

	public void block(String IPAddress)
	{
		notSupported();
	}

	public IPBanned[] getBannedIPs()
	{
		notSupported();
		return null;
	}

	public void ban(String IPAddress, String text)
	{
		notSupported();
	}

	public void unban(String IPAddress)
	{
		notSupported();
	}

	public boolean getInRangeAddressesAreAllowed()
	{
		Boolean res = (Boolean)_dispatcher.dispatch(new RPRequest(this, "getInRangeAddressesAreAllowed", null)).getResponse();
		return res.booleanValue();
	}

	public void setInRangeAddressesAreAllowed(boolean value)
	{
		_dispatcher.dispatch(new RPRequest(this, "setInRangeAddressesAreAllowed[boolean]", new Object[] {
			new Boolean(value)
		})).getResponse();
	}

	public boolean isEnabled()
	{
		Boolean res = (Boolean)_dispatcher.dispatch(new RPRequest(this, "isEnabled", null)).getResponse();
		return res.booleanValue();
	}

	public void setEnabled(boolean value)
	{
		_dispatcher.dispatch(new RPRequest(this, "setEnabled[boolean]", new Object[] {
			new Boolean(value)
		})).getResponse();
	}

	public void save()
		throws IPFilterException
	{
		try
		{
			_dispatcher.dispatch(new RPRequest(this, "save", null)).getResponse();
		}
		catch (RPException e)
		{
			if (e.getCause() instanceof IPFilterException)
				throw (IPFilterException)e.getCause();
			else
				throw e;
		}
	}

	public void markAsUpToDate()
	{
		notSupported();
	}

	public long getLastUpdateTime()
	{
		return last_update_time;
	}

	public int getNumberOfRanges()
	{
		return number_of_ranges;
	}

	public int getNumberOfBlockedIPs()
	{
		return number_of_blocked_ips;
	}

	public int getNumberOfBannedIPs()
	{
		notSupported();
		return -1;
	}
}

⌨️ 快捷键说明

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