本文整理汇总了Java中org.apache.xmlrpc.WebServer类的典型用法代码示例。如果您正苦于以下问题:Java WebServer类的具体用法?Java WebServer怎么用?Java WebServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WebServer类属于org.apache.xmlrpc包,在下文中一共展示了WebServer类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
public void setUp() throws Exception {
super.setUp();
CURRENT_PORT++;
fakeServer = new WebServer(CURRENT_PORT);
handler = context.mock( Handler.class );
fakeServer.addHandler( "greenpepper1", handler );
fakeServer.start();
// keep the current directory
String origCWD = System.getProperty("user.dir");
URL resource = getClass().getResource("/remoteagent.properties");
System.setProperty("user.dir", FileUtils.toFile(resource).getParent());
Agent.main(new String[0]);
System.setProperty("user.dir",origCWD);
}
开发者ID:strator-dev,项目名称:greenpepper,代码行数:17,代码来源:AgentTest.java
示例2: suite
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
public static Test suite() {
return new TestSetup(new TestSuite(GreenPepperRepositoryTest.class)) {
@Override
protected void setUp() throws Exception
{
ws = new WebServer( 9005 );
ws.start();
}
@Override
protected void tearDown() throws Exception
{
ws.shutdown();
}
};
}
开发者ID:strator-dev,项目名称:greenpepper,代码行数:17,代码来源:GreenPepperRepositoryTest.java
示例3: initXmlRpcServer
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
/**
* Initializes the XML RPC server. Must be done before {@link #initXmlRpcClient()}.
*/
private final void initXmlRpcServer() {
this.eventServer = new WebServer(EVENT_PORT);
this.eventHandler = this::dispatchEvent;
if (logger.isLoggable(Level.INFO)) {
logger.log(Level.INFO, "CCU Eventing RPC server : starting.");
}
this.eventServer.addHandler("$default", this.eventHandler);
this.eventServer.start();
if (logger.isLoggable(Level.INFO)) {
logger.log(Level.INFO, "CCU Eventing RPC server : started.");
}
}
开发者ID:abollaert,项目名称:homematic,代码行数:19,代码来源:CCUEventingImpl.java
示例4: XmlRpcFileManager
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
/**
* <p> Creates a new XmlRpcFileManager with the given metadata store factory, and the given data store factory, on the
* given port. </p>
*
* @param port The web server port to run the XML Rpc server on, defaults to 1999.
*/
public XmlRpcFileManager(int port) throws Exception {
webServerPort = port;
// start up the web server
webServer = new WebServer(webServerPort);
webServer.addHandler("filemgr", this);
webServer.start();
List<String> propertiesFiles = new ArrayList<>();
// set up the configuration, if there is any
if (System.getProperty("org.apache.oodt.cas.filemgr.properties") != null) {
propertiesFiles.add(System.getProperty("org.apache.oodt.cas.filemgr.properties"));
}
configurationManager = ConfigurationManagerFactory.getConfigurationManager(Component.FILE_MANAGER, propertiesFiles);
configurationManager.addConfigurationListener(configurationListener);
this.loadConfiguration();
LOG.log(Level.INFO, "File Manager started by " + System.getProperty("user.name", "unknown"));
}
开发者ID:apache,项目名称:oodt,代码行数:28,代码来源:XmlRpcFileManager.java
示例5: PydevConsoleCommunication
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
/**
* Initializes the xml-rpc communication.
*
* @param port the port where the communication should happen.
* @param process this is the process that was spawned (server for the XML-RPC)
* @throws MalformedURLException
*/
public PydevConsoleCommunication(Project project, int port, Process process, int clientPort) throws Exception {
super(project);
//start the server that'll handle input requests
myWebServer = new WebServer(clientPort, null);
myWebServer.addHandler("$default", this);
this.myWebServer.start();
this.myClient = new PydevXmlRpcClient(process, port);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PydevConsoleCommunication.java
示例6: startWebServer
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
private void startWebServer()
{
ws = new WebServer( 9005 );
handler = new Mock( Handler.class );
ws.addHandler( "greenpepper1", handler.proxy() );
ws.start();
}
开发者ID:strator-dev,项目名称:greenpepper,代码行数:8,代码来源:SpecificationRunnerMojoTest.java
示例7: setUp
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
MockLogAppender.setupLogging();
XmlRpcWebServerFactoryBean wsf = new XmlRpcWebServerFactoryBean();
wsf.setPort(9192);
wsf.setSecure(false);
wsf.afterPropertiesSet();
m_webServer = (WebServer)wsf.getObject();
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:13,代码来源:XmlRpcTest.java
示例8: setupWebServer
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
public void setupWebServer() throws IOException {
m_logger.info("XmlrpcAnticipator starting on port number " + m_port);
m_webServer = new WebServer(m_port);
m_webServer.addHandler("$default", this);
m_webServer.start();
waitForStartup();
m_logger.info("XmlrpcAnticipator running on port number " + m_port);
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:11,代码来源:XmlrpcAnticipator.java
示例9: XmlRpcResourceManager
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
public XmlRpcResourceManager(int port) throws IOException {
List<String> propertiesFiles = new ArrayList<>();
// set up the configuration, if there is any
if (System.getProperty("org.apache.oodt.cas.resource.properties") != null) {
propertiesFiles.add(System.getProperty("org.apache.oodt.cas.resource.properties"));
}
configurationManager = ConfigurationManagerFactory.getConfigurationManager(Component.RESOURCE_MANAGER, propertiesFiles);
try {
configurationManager.loadConfiguration();
} catch (Exception e) {
LOG.log(Level.SEVERE, "Unable to load configuration", e);
throw new IOException("Unable to load configuration", e);
}
String schedulerClassStr = System.getProperty(
"resource.scheduler.factory",
"org.apache.oodt.cas.resource.scheduler.LRUSchedulerFactory");
scheduler = GenericResourceManagerObjectFactory
.getSchedulerServiceFromFactory(schedulerClassStr);
// start up the scheduler
new Thread(scheduler).start();
// start up the web server
webServer = new WebServer(port);
webServer.addHandler("resourcemgr", this);
webServer.start();
LOG.log(Level.INFO, "Resource Manager started by "
+ System.getProperty("user.name", "unknown"));
}
开发者ID:apache,项目名称:oodt,代码行数:37,代码来源:XmlRpcResourceManager.java
示例10: XmlRpcBatchStub
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
public XmlRpcBatchStub(int port) {
webServerPort = port;
// start up the web server
webServer = new WebServer(webServerPort);
webServer.addHandler("batchstub", this);
webServer.start();
jobThreadMap = new ConcurrentHashMap();
LOG.log(Level.INFO, "XmlRpc Batch Stub started by "
+ System.getProperty("user.name", "unknown"));
}
开发者ID:apache,项目名称:oodt,代码行数:14,代码来源:XmlRpcBatchStub.java
示例11: startUp
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
@Override
public boolean startUp() throws Exception {
webServer = new WebServer(this.port);
webServer.addHandler("filemgr", this);
webServer.start();
this.fileManager = new FileManager();
this.loadConfiguration();
return true;
}
开发者ID:apache,项目名称:oodt,代码行数:10,代码来源:XmlRpcFileManagerServer.java
示例12: XmlRpcWorkflowManager
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
public XmlRpcWorkflowManager(int port) {
Preconditions.checkArgument(port > 0, "Must specify a port greater than 0");
List<String> propertiesFiles = new ArrayList<>();
String configFile = System.getProperty(PROPERTIES_FILE_PROPERTY);
if (configFile != null) {
propertiesFiles.add(configFile);
}
configurationManager= ConfigurationManagerFactory.getConfigurationManager(Component.WORKFLOW_MANAGER,propertiesFiles);
try {
configurationManager.loadConfiguration();
} catch (Exception e) {
LOG.log(Level.SEVERE, "Unable to load configuration", e);
throw new IllegalStateException("Unable to load configuration", e);
}
engine = getWorkflowEngineFromProperty();
engine.setWorkflowManagerUrl(safeGetUrlFromString("http://"
+ getHostname() + ":" + port));
repo = getWorkflowRepositoryFromProperty();
// start up the web server
webServer = new WebServer(port);
webServer.addHandler(XML_RPC_HANDLER_NAME, this);
webServer.start();
LOG.log(Level.INFO, "Workflow Manager started by "
+ System.getProperty("user.name", "unknown"));
}
开发者ID:apache,项目名称:oodt,代码行数:31,代码来源:XmlRpcWorkflowManager.java
示例13: startCrawling
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
public void startCrawling() {
// start up the web server
WebServer server = new WebServer(this.daemonPort);
server.addHandler("crawldaemon", this);
server.start();
LOG.log(Level.INFO, "Crawl Daemon started by "
+ System.getProperty("user.name", "unknown"));
while (running) {
// okay, time to crawl
long timeBefore = System.currentTimeMillis();
crawler.crawl();
long timeAfter = System.currentTimeMillis();
milisCrawling += (timeAfter - timeBefore);
numCrawls++;
LOG.log(Level.INFO, "Sleeping for: [" + waitInterval + "] seconds");
// take a nap
try {
Thread.currentThread().sleep(waitInterval * 1000);
} catch (InterruptedException ignore) {
}
}
LOG.log(Level.INFO, "Crawl Daemon: Shutting down gracefully");
LOG.log(Level.INFO, "Num Crawls: [" + this.numCrawls + "]");
LOG.log(Level.INFO, "Total time spent crawling: ["
+ (this.milisCrawling / DOUBLE) + "] seconds");
LOG.log(Level.INFO, "Average Crawl Time: ["
+ (this.getAverageCrawlTime() / DOUBLE) + "] seconds");
server.shutdown();
}
开发者ID:apache,项目名称:oodt,代码行数:34,代码来源:CrawlDaemon.java
示例14: createWebServer
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
@BeforeClass
public static void createWebServer() {
ws = new WebServer( 19005 );
ws.start();
}
开发者ID:bsorrentino,项目名称:maven-confluence-plugin,代码行数:6,代码来源:TemplateVariablesInPagesTest.java
示例15: startWebServer
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
private void startWebServer() {
ws = new WebServer(19005);
handler = new Mock(Handler.class);
ws.addHandler("greenpepper1", handler.proxy());
ws.start();
}
开发者ID:strator-dev,项目名称:greenpepper,代码行数:7,代码来源:SpecificationDownloaderMojoTest.java
示例16: getObject
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
/**
* <p>
* getObject
* </p>
*
* @return a {@link java.lang.Object} object.
* @throws java.lang.Exception
* if any.
*/
public WebServer getObject() throws Exception {
return m_webServer;
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:13,代码来源:XmlRpcWebServerFactoryBean.java
示例17: getObjectType
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
/**
* <p>
* getObjectType
* </p>
*
* @return a {@link java.lang.Class} object.
*/
public Class<? extends WebServer> getObjectType() {
return WebServer.class;
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:11,代码来源:XmlRpcWebServerFactoryBean.java
示例18: getWebServer
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
/**
* <p>Getter for the field <code>webServer</code>.</p>
*
* @return a {@link org.apache.xmlrpc.WebServer} object.
*/
public WebServer getWebServer() {
return this.webServer;
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:9,代码来源:XmlRpcServiceExporter.java
示例19: setWebServer
import org.apache.xmlrpc.WebServer; //导入依赖的package包/类
/**
* <p>Setter for the field <code>webServer</code>.</p>
*
* @param webServer a {@link org.apache.xmlrpc.WebServer} object.
*/
public void setWebServer(WebServer webServer) {
this.webServer = webServer;
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:9,代码来源:XmlRpcServiceExporter.java
注:本文中的org.apache.xmlrpc.WebServer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论