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

📄 backgroundprocess.java

📁 struts 2 核心包 的源码 有错误是难免的
💻 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:   BackgroundProcess.java

package org.apache.struts2.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import java.io.Serializable;

public class BackgroundProcess
	implements Serializable
{

	private static final long serialVersionUID = 0x35e864221e93452bL;
	protected Object action;
	protected ActionInvocation invocation;
	protected String result;
	protected Exception exception;
	protected boolean done;

	public BackgroundProcess(String threadName, final ActionInvocation invocation, int threadPriority)
	{
		this.invocation = invocation;
		action = invocation.getAction();
		try
		{
			Thread t = new Thread(new Runnable() {

				final ActionInvocation val$invocation;
				final BackgroundProcess this$0;

				public void run()
				{
					try
					{
						beforeInvocation();
						result = invocation.invokeActionOnly();
						afterInvocation();
					}
					catch (Exception e)
					{
						exception = e;
					}
					done = true;
				}

			
			{
				this$0 = BackgroundProcess.this;
				invocation = actioninvocation;
				super();
			}
			});
			t.setName(threadName);
			t.setPriority(threadPriority);
			t.start();
		}
		catch (Exception e)
		{
			exception = e;
		}
	}

	protected void beforeInvocation()
		throws Exception
	{
	}

	protected void afterInvocation()
		throws Exception
	{
	}

	public Object getAction()
	{
		return action;
	}

	public ActionInvocation getInvocation()
	{
		return invocation;
	}

	public String getResult()
	{
		return result;
	}

	public Exception getException()
	{
		return exception;
	}

	public boolean isDone()
	{
		return done;
	}
}

⌨️ 快捷键说明

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