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

📄 mabstractrule.java

📁 httptunnel.jar httptunnel java 源码
💻 JAVA
字号:
package net.jumperz.app.MGuardian.rule;

import java.util.regex.*;
import java.util.*;

public abstract class MAbstractRule
{
private static final String DO_NOTHING = "NONE";

public static final int REQUEST		= 1;
public static final int RESPONSE	= 2;

public static final String ACTION_NONE		= "none";
public static final String ACTION_BLOCK		= "block";
public static final String ACTION_PASS_ALL	= "pass";
public static final String ACTION_PASS_RULE	= "pass ";

protected String id;
protected int revision;
protected String name;
protected boolean logFlag = true;
protected String action = MAbstractRule.ACTION_BLOCK;
protected String command;
protected boolean negationFlag = false;
protected Pattern pattern;
protected int ruleType;
protected List pluginList;
protected List pluginArgList;
private List passRuleList;
//--------------------------------------------------------------------------------
public void init()
{
}
//--------------------------------------------------------------------------------
public void setPassRuleList( List l )
{
passRuleList = l;
}
//--------------------------------------------------------------------------------
public List getPassRuleList()
{
return passRuleList;
}
//-----------------------------------------------------------------------------------
public final int getRuleType()
{
return ruleType;
}
//-----------------------------------------------------------------------------------
public final void setPattern( String patternStr, boolean ignoreCase )
{
if( ignoreCase )
	{
	pattern = Pattern.compile( patternStr, Pattern.CASE_INSENSITIVE );
	}
else
	{
	pattern = Pattern.compile( patternStr );
	}
}
//-----------------------------------------------------------------------------
public final boolean hasCommand()
{
if( command == null )
	{
	return false;
	}
else if( command.equalsIgnoreCase( MAbstractRule.DO_NOTHING ) )
	{
	return false;
	}
else if( command.equals( "" ) )
	{
	return false;
	}
else
	{
	return true;
	}
}

//-----------------------------------------------------------------------------
public String getAction()
{
return action;
}
//-----------------------------------------------------------------------------
public void setAction( String in_action )
{
action = in_action;
}
//--------------------------------------------------------------------------------
public String toString()
{
StringBuffer strBuf = new StringBuffer( 100 );
strBuf.append( id );
strBuf.append( ":" );
strBuf.append( revision );
strBuf.append( ":" );
strBuf.append( name );

return strBuf.toString();
}
//-----------------------------------------------------------------------------
public String getCommand() {
	return command;
}

/**
 * Returns the logFlag.
 * @return boolean
 */
public final boolean getLogFlag() {
	return logFlag;
}

/**
 * Returns the name.
 * @return String
 */
public final String getName() {
	return name;
}

public final void setCommand(String command) {
	this.command = command;
}

/**
 * Sets the logFlag.
 * @param logFlag The logFlag to set
 */
public final void setLogFlag(boolean logFlag) {
	this.logFlag = logFlag;
}

/**
 * Sets the name.
 * @param name The name to set
 */
public final void setName(String name) {
	this.name = name;
}
/**
 * Sets the negationFlag.
 * @param negationFlag The negationFlag to set
 */
public final void setNegationFlag(boolean negationFlag) {
	this.negationFlag = negationFlag;
}

public List getPluginList() {
	return pluginList;
}

public void setPluginList(List list) {
	pluginList = list;
}

public String getId() {
	return id;
}

public int getRevision() {
	return revision;
}

public void setId(String string) {
	id = string;
}

public void setRevision(int i) {
	revision = i;
}

public List getPluginArgList()
{

return pluginArgList;
}
public void setPluginArgList( List pluginArgList )
{

this.pluginArgList = pluginArgList;
}
}

⌨️ 快捷键说明

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