com.ibm.ws.scripting.adminCommand.AdminTask在世界上什么地方? [英] Where in the world is com.ibm.ws.scripting.adminCommand.AdminTask?
问题描述
由于对WebSphere Admin Server提供的该死的糟糕API感到沮丧,我正在编写自己的Java DSL包装器.我的jython文件现在只需阅读:
Frustrated with the damn awful API provided by WebSphere Admin Server, I'm writing my own Java DSL wrapper. My jython files now simply read:
from my.package import MyDSL
config = MyDSL(AdminConfig, AdminTask)
config.goGoGadgetSkates() # or something like that
最重要的部分是我发送了(#%$$!@#)个上帝对象AdminConfig
和AdminTask
,以便DSL可以使用它们在WAS中执行操作.
The essential part is that I send through the (#%$$!@#) god objects AdminConfig
and AdminTask
so that the DSL can use them to perform operations in WAS.
为了编译DSL,我需要包括这两个对象的类文件.我首先将构造函数设置为:
In order to compile the DSL I need to include the class files for this two objects. I find them by first setting the constructor as:
public MyDSL(Object a, Object b) {
System.out.println(a.getClass());
System.out.println(b.getClass());
}
输出显示AdminConfig对象是com.ibm.ws.scripting.AdminConfigClient
的实例.我轻松地找到了包含此类的罐子,一切都很好.
The output showed that the AdminConfig object is an instance of com.ibm.ws.scripting.AdminConfigClient
. I easily located the jar that contains this class and all is well.
但是AdminTask是com.ibm.ws.scripting.adminCommand.AdminTask
的实例.尽管该类在运行时出现,但在我的类路径中的任何位置或计算机硬盘驱动器中的任何位置都不存在此类.
But AdminTask is an instance of com.ibm.ws.scripting.adminCommand.AdminTask
. Despite being present at runtime, this class does not exist anywhere in my classpath or indeed anywhere on my computer's hard drive.
我只能假定com.ibm.ws.scripting.adminCommand.AdminTask
是WSAdmin在jython层中神奇构造的.也许它被定义为python类?
I can only assume com.ibm.ws.scripting.adminCommand.AdminTask
is constructed magically by WSAdmin in the jython layer. Perhaps it is defined as a python class?
在我重新思考之前 ,有人可以解释com.ibm.ws.scripting.adminCommand.AdminTask
可能存在的位置以及如何提取类文件的副本吗?
Before I resort to reflection, can someone please explain where com.ibm.ws.scripting.adminCommand.AdminTask
might live and how I might extract a copy of the class file?
推荐答案
AdminConfigClient类不是API/SPI,因此您将依靠该类来创建脆弱的基础结构. API/SPI入口点是
The AdminConfigClient class is not API/SPI, so you are creating a fragile infrastructure by relying on that class. The API/SPI entry point is ConfigServiceFactory.
The AdminTask object is backed by the data in CommandMgr. It should be possible to use CommandMgr to do anything you can do with AdminTask.
这篇关于com.ibm.ws.scripting.adminCommand.AdminTask在世界上什么地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!