public class FinePlugin
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
java.lang.Class |
classForName(java.lang.String className)
加载Class
|
boolean |
contain(PluginModule module)
是否包含某模块的注入
|
boolean |
contain(PluginModule module,
java.lang.String injectionName)
是否包含特定模块的某注入
|
boolean |
contain(java.lang.String injectionName)
是否包含特性注入
|
void |
delayExecuteRecoverable(RecoverableTask task)
延迟执行的任务,如果插件还未运行,则等待运行后执行execute方法
|
void |
enable() |
void |
executeRecoverable(RecoverableTask task)
在上下文中执行一个可恢复的任务,在插件Stop时,会自动执行undo操作
该方法与插件内置监听的作用相似,可以用这个方法保证局部的正常关闭,用内置监听作为插件整体的入口和出口
|
void |
forbid() |
java.lang.Class<?> |
forceClassForName(java.lang.String className)
强制生成对象,如果当前没有ClassLoader则生成一个临时的,用于引擎内部使用
|
void |
freeze()
冻结,即禁止状态的改变,多用于有依赖关系的插件之间使用
|
void |
functionRecorderDetected()
检测到functionRecorder,表示可以运行
|
<T> T |
getAttribute(java.lang.String name)
获取存储的对象
|
java.util.ResourceBundle |
getBundle(java.lang.String baseName,
java.util.Locale locale)
获取国际化文件Bundle
|
java.lang.String |
getChangeNotes() |
java.lang.ClassLoader |
getClassLoader()
获取ClassLoader,用于依赖插件的父子关系
|
java.util.List<java.net.URL> |
getClassPaths() |
com.fr.third.javassist.ClassPool |
getClassPool()
获取javassist的classPool
|
java.lang.String |
getDescription() |
java.lang.String |
getEnvVersion() |
PluginErrorCode |
getErrorCode()
错误信息
|
java.lang.String |
getID() |
int |
getLeftDays()
剩余可用天数
|
java.lang.String |
getMainPackage() |
PluginMarker |
getMarker()
标志符
|
java.lang.String |
getMd5Key() |
java.lang.String |
getName() |
java.lang.String |
getPrice() |
java.lang.String |
getRequiredJarTime() |
java.net.URL |
getResource(java.lang.String name)
从插件中查找资源
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
从插件中查找资源
|
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name)
从插件中查找资源
|
PluginRuntime |
getRuntime()
获取插件运行时上下文
|
java.lang.String |
getVendor() |
java.lang.String |
getVersion() |
PluginXml |
getXml()
获取插件表示,读取之后不会随文件的改变而改变
|
void |
initLicense()
生成Plugin对象之后调用,用于第一次尝试读取license
|
boolean |
isActive() |
boolean |
isAvailable()
是否可用
|
boolean |
isError()
是不是存在错误而无法运行
|
boolean |
isFree()
是否免费
|
boolean |
isHidden() |
boolean |
isLicDamaged()
判断lic文件是否被损坏
|
boolean |
isLoadBy(java.lang.ClassLoader classLoader)
判断是否是被这个classLoader加载的
|
boolean |
isMainClass(java.lang.String className)
判断一个类是不是在xml中描述的入口类
|
boolean |
isOnTrial()
是否是试用版本
|
boolean |
isRegisterFailed()
是否注册失败
|
boolean |
isResourceAvailable()
资源文件是否可以被插件资源池获取
|
boolean |
isRunning()
是否正在运行
|
java.lang.Class |
loadClass(java.lang.String className)
加载Class不初始化
|
boolean |
needCompat()
插件是否需要兼容8.0,即能否在8.0中运行
|
java.util.concurrent.ExecutorService |
newCachedThreadPool() |
java.util.concurrent.ExecutorService |
newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory) |
java.util.concurrent.ExecutorService |
newFixedThreadPool(int nThreads) |
java.util.concurrent.ExecutorService |
newFixedThreadPool(int nThreads,
java.util.concurrent.ThreadFactory threadFactory) |
java.util.concurrent.ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize) |
java.util.concurrent.ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory) |
java.net.ServerSocket |
newServerSocket() |
java.net.ServerSocket |
newServerSocket(int port) |
java.net.ServerSocket |
newServerSocket(int port,
int backlog) |
java.net.ServerSocket |
newServerSocket(int port,
int backlog,
java.net.InetAddress bindAddress) |
java.util.concurrent.ExecutorService |
newSingleThreadExecutor() |
java.util.concurrent.ExecutorService |
newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory) |
java.util.concurrent.ScheduledExecutorService |
newSingleThreadScheduledExecutor() |
java.util.concurrent.ScheduledExecutorService |
newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory) |
java.net.Socket |
newSocket() |
java.net.Socket |
newSocket(java.net.InetAddress address,
int port) |
java.net.Socket |
newSocket(java.net.Proxy proxy) |
java.net.Socket |
newSocket(java.lang.String host,
int port) |
java.net.Socket |
newSocket(java.lang.String host,
int port,
java.net.InetAddress localAddress,
int localPort) |
java.util.Timer |
newTimer() |
java.util.Timer |
newTimer(boolean isDaemon) |
java.util.Timer |
newTimer(java.lang.String name) |
java.util.Timer |
newTimer(java.lang.String name,
boolean isDaemon) |
<T> void |
putAttribute(java.lang.String name,
T value)
存储对象
|
java.lang.String |
registerMessage()
附加信息
|
void |
run() |
void |
setLicense(java.io.InputStream licIn)
设置lic
|
void |
stop() |
boolean |
supportCurrentFRVersion()
是否支持当前环境
|
java.lang.String |
toString() |
java.util.concurrent.ExecutorService |
unconfigurableExecutorService(java.util.concurrent.ExecutorService executor) |
java.util.concurrent.ScheduledExecutorService |
unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor) |
void |
unfreeze()
解冻
|
public void initLicense()
Plugin
public java.util.List<java.net.URL> getClassPaths()
public void run() throws PluginException
PluginException
public void stop() throws PluginException
PluginException
public void forbid() throws PluginException
PluginException
public void enable() throws PluginException
PluginException
public boolean isResourceAvailable()
Plugin
public boolean isLoadBy(java.lang.ClassLoader classLoader)
Plugin
public void setLicense(java.io.InputStream licIn) throws PluginException
Plugin
PluginException
public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
Plugin
java.lang.ClassNotFoundException
public void functionRecorderDetected()
Plugin
public com.fr.third.javassist.ClassPool getClassPool()
Plugin
public java.lang.Class<?> forceClassForName(java.lang.String className) throws java.lang.ClassNotFoundException
Plugin
java.lang.ClassNotFoundException
public java.lang.ClassLoader getClassLoader()
Plugin
public void freeze()
Plugin
public void unfreeze()
Plugin
public java.lang.Class classForName(java.lang.String className) throws java.lang.ClassNotFoundException
PluginResourcePool
java.lang.ClassNotFoundException
public java.net.URL getResource(java.lang.String name)
PluginResourceLoader
name
- 资源名public java.io.InputStream getResourceAsStream(java.lang.String name)
PluginResourceLoader
name
- 资源名public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
PluginResourceLoader
name
- 资源名java.io.IOException
public java.util.ResourceBundle getBundle(java.lang.String baseName, java.util.Locale locale)
PluginResourceLoader
public boolean isAvailable()
Licensed
public boolean isRegisterFailed()
Licensed
public boolean isOnTrial()
Licensed
public boolean isFree()
Licensed
public int getLeftDays()
Licensed
public boolean isLicDamaged()
Licensed
public java.lang.String registerMessage()
Licensed
public java.util.Timer newTimer()
public java.util.Timer newTimer(boolean isDaemon)
public java.util.Timer newTimer(java.lang.String name)
public java.util.Timer newTimer(java.lang.String name, boolean isDaemon)
public java.net.Socket newSocket()
public java.net.Socket newSocket(java.net.Proxy proxy)
public java.net.Socket newSocket(java.lang.String host, int port) throws java.io.IOException
java.io.IOException
public java.net.Socket newSocket(java.net.InetAddress address, int port) throws java.io.IOException
java.io.IOException
public java.net.Socket newSocket(java.lang.String host, int port, java.net.InetAddress localAddress, int localPort) throws java.io.IOException
java.io.IOException
public java.net.ServerSocket newServerSocket() throws java.io.IOException
java.io.IOException
public java.net.ServerSocket newServerSocket(int port) throws java.io.IOException
java.io.IOException
public java.net.ServerSocket newServerSocket(int port, int backlog) throws java.io.IOException
java.io.IOException
public java.net.ServerSocket newServerSocket(int port, int backlog, java.net.InetAddress bindAddress) throws java.io.IOException
java.io.IOException
public java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads)
public java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
public java.util.concurrent.ExecutorService newSingleThreadExecutor()
public java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory)
public java.util.concurrent.ExecutorService newCachedThreadPool()
public java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory)
public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor()
public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory)
public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int corePoolSize)
public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int corePoolSize, java.util.concurrent.ThreadFactory threadFactory)
public java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService executor)
public java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService executor)
public void executeRecoverable(RecoverableTask task)
HotDeployToolKit
public void delayExecuteRecoverable(RecoverableTask task)
HotDeployToolKit
public PluginMarker getMarker()
PluginContext
getMarker
在接口中 PluginContext
public PluginXml getXml()
PluginContext
getXml
在接口中 PluginContext
public boolean isError()
PluginContext
isError
在接口中 PluginContext
public PluginErrorCode getErrorCode()
PluginContext
getErrorCode
在接口中 PluginContext
public boolean isRunning()
PluginContext
isRunning
在接口中 PluginContext
public PluginRuntime getRuntime()
PluginContext
getRuntime
在接口中 PluginContext
public <T> void putAttribute(java.lang.String name, T value)
PluginContext
putAttribute
在接口中 PluginContext
public <T> T getAttribute(java.lang.String name)
PluginContext
getAttribute
在接口中 PluginContext
public java.lang.String getID()
public java.lang.String getName()
public java.lang.String getVersion()
public java.lang.String getEnvVersion()
public java.lang.String getRequiredJarTime()
public java.lang.String getMd5Key()
public java.lang.String getPrice()
public java.lang.String getVendor()
public java.lang.String getDescription()
public java.lang.String getMainPackage()
public java.lang.String getChangeNotes()
public boolean isActive()
public boolean isHidden()
public boolean contain(java.lang.String injectionName)
InjectionChecker
injectionName
- 注入名称(接口Mask)public boolean contain(PluginModule module)
InjectionChecker
module
- 模块类型public boolean contain(PluginModule module, java.lang.String injectionName)
InjectionChecker
module
- 模块类型injectionName
- 注入名称(接口Mask)public boolean isMainClass(java.lang.String className)
InjectionChecker
public java.lang.String toString()
toString
在类中 java.lang.Object
public boolean needCompat()
PluginView
public boolean supportCurrentFRVersion()
PluginView