Commit 60b399cd by s_guodong

pom文件整理

parent 0e4a33ed
......@@ -32,11 +32,9 @@
<xapool.version>1.5.0</xapool.version>
<jotm.version>2.1.9</jotm.version>
<dbcp.version>1.4</dbcp.version>
<bcprov-jdk15on.version>1.50</bcprov-jdk15on.version>
<el.version>1.0</el.version>
<gson.version>2.6.2</gson.version>
<codec.version>1.10</codec.version>
<activemq-all.version>5.13.2</activemq-all.version>
<net.version>3.3</net.version>
<jsch.version>0.1.53</jsch.version>
<ibm.mq.allclient.version>9.1.5.0</ibm.mq.allclient.version>
......@@ -48,7 +46,6 @@
<httpcore.version>4.2.4</httpcore.version>
<httpclient.version>4.2.5</httpclient.version>
<commons-modeler.version>2.0.1</commons-modeler.version>
<xercesImpl.version>2.10.0</xercesImpl.version>
<nekohtml.version>1.9.19</nekohtml.version>
<ant.version>1.9.2</ant.version>
<pw-swift-core.version>SRU2014-7.6</pw-swift-core.version>
......@@ -71,11 +68,11 @@
<spring.jms.version>5.3.21</spring.jms.version>
<active.client.version>5.9.0</active.client.version>
<active.broker.version>5.9.0</active.broker.version>
<javax.jms-api.version>2.0.1</javax.jms-api.version>
<hawtbuf.version>1.11</hawtbuf.version>
<geronimo-j2ee-management_1.1_spec.version>1.0.1</geronimo-j2ee-management_1.1_spec.version>
<geronimo-jms_1.1_spec.version>1.1.1</geronimo-jms_1.1_spec.version>
<hessian.version>4.0.66</hessian.version>
<snmp4j.version>2.5.0</snmp4j.version>
<!-- 日志 -->
<slf4j-api_version>1.7.25</slf4j-api_version>
<jul-to-slf4j_version>1.7.30</jul-to-slf4j_version>
......@@ -85,6 +82,7 @@
</properties>
<dependencies>
<!--xml相关-->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
......@@ -95,46 +93,163 @@
<artifactId>dom4j</artifactId>
<version>${dom4j.version}</version>
</dependency>
<!--网络应用相关-->
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>${mina.version}</version>
</dependency>
<!--commons类包-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${io.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${beanutils.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${lang.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${fileupload.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${dbcp.version}</version>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>${el.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${codec.version}</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${net.version}</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>${commons-httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-modeler</groupId>
<artifactId>commons-modeler</artifactId>
<version>${commons-modeler.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jexl</artifactId>
<version>${commons-jexl.version}</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.javamail</groupId>
<artifactId>geronimo-javamail_1.4_mail</artifactId>
<version>${javamail.version}</version>
</dependency>
<!--jms相关-->
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<version>${jms.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.allclient</artifactId>
<version>${ibm.mq.allclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-client</artifactId>
<version>${rocketmq-client.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>ons-client</artifactId>
<version>${ons-client.version}</version>
</dependency>
<!--activemq-->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>${active.client.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>${active.broker.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.fusesource.hawtbuf</groupId>
<artifactId>hawtbuf</artifactId>
<version>${hawtbuf.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
<version>${geronimo-j2ee-management_1.1_spec.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>${geronimo-jms_1.1_spec.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.tx.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.jms.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.context.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.core.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.beans.version}</version>
</dependency>
<!--图表-->
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>${jfreechart.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${beanutils.version}</version>
</dependency>
<!--es-->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${lang.version}</version>
</dependency>
<!--excel-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
......@@ -150,76 +265,47 @@
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${fileupload.version}</version>
</dependency>
<!--jedis-->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
<!--数据库相关-->
<dependency>
<groupId>com.experlog</groupId>
<artifactId>xapool</artifactId>
<version>${xapool.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<!--事务管理-->
<dependency>
<groupId>org.ow2.jotm</groupId>
<artifactId>jotm-core</artifactId>
<version>${jotm.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${dbcp.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${bcprov-jdk15on.version}</version>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>${el.version}</version>
</dependency>
<!--gson-->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<!--MessageInterceptor中-->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${codec.version}</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${net.version}</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>${jsch.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.allclient</artifactId>
<version>${ibm.mq.allclient.version}</version>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>${wss4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>${cxf.version}</version>
</dependency>
<!--httpServer中-->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
......@@ -230,50 +316,30 @@
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-client</artifactId>
<version>${rocketmq-client.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>ons-client</artifactId>
<version>${ons-client.version}</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>${commons-httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-modeler</groupId>
<artifactId>commons-modeler</artifactId>
<version>${commons-modeler.version}</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${xercesImpl.version}</version>
</dependency>
<!--htm2xml-->
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>${nekohtml.version}</version>
</dependency>
<!--压缩解压工具CompressUtil中用到-->
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${ant.version}</version>
</dependency>
<!--swift相关-->
<dependency>
<groupId>com.prowidesoftware</groupId>
<artifactId>pw-swift-core</artifactId>
<version>${pw-swift-core.version}</version>
</dependency>
<!--通信相关-->
<!--ssh-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jexl</artifactId>
<version>${commons-jexl.version}</version>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>${jsch.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
......@@ -286,10 +352,38 @@
<version>${httpcore.version}</version>
</dependency>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<version>${connector-api.version}</version>
</dependency>
<dependency>
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
<version>${hessian.version}</version>
</dependency>
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j</artifactId>
<version>${snmp4j.version}</version>
</dependency>
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j-agent</artifactId>
<version>${snmp4j.version}</version>
</dependency>
<!--插件httpConnectionBetter使用-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>${hutool.core.version}</version>
</dependency>
<!--模板引擎-->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<!--邮件相关-->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
......@@ -300,23 +394,6 @@
<artifactId>jsp-api</artifactId>
<version>${jsp-api.version}</version>
</dependency>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<version>${connector-api.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<!--插件httpConnectionBetter使用-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>${hutool.core.version}</version>
</dependency>
<!--日志-->
<dependency>
<groupId>org.slf4j</groupId>
......@@ -374,78 +451,9 @@
<scope>provided</scope>
</dependency>
<!--activemq-->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>${active.client.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>${active.broker.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.fusesource.hawtbuf</groupId>
<artifactId>hawtbuf</artifactId>
<version>${hawtbuf.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
<version>${geronimo-j2ee-management_1.1_spec.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>${geronimo-jms_1.1_spec.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.tx.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.jms.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.context.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.core.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.beans.version}</version>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<version>${javax.jms-api.version}</version>
</dependency>
<!--本地依赖-->
<dependency>
<groupId>org.sss</groupId>
<artifactId>eibs-container</artifactId>
<version>3.5.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/eibs-container-3.5.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.swetake</groupId>
<artifactId>picture</artifactId>
<version>1.0.0.0</version>
......@@ -453,13 +461,6 @@
<systemPath>${pom.basedir}/lib/picture-1.0.0.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/weblogic.jar</systemPath>
</dependency>
<dependency>
<groupId>com.cfca</groupId>
<artifactId>PKIBASE_JDK16_20140820</artifactId>
<version>1.0</version>
......@@ -481,33 +482,12 @@
<systemPath>${pom.basedir}/lib/keyczar-0.71g-090613.jar</systemPath>
</dependency>
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j</artifactId>
<version>2.3.4</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/snmp4j-2.3.4.jar</systemPath>
</dependency>
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j-agent</artifactId>
<version>2.4.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/snmp4j-agent-2.4.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.tibco</groupId>
<artifactId>tibjms</artifactId>
<version>6.3.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/tibjms.jar</systemPath>
</dependency>
<dependency>
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
<version>3.0.20</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/hessian-3.0.20.jar</systemPath>
</dependency>
</dependencies>
......
package com.brilliance.eibs.server.manager;
import com.brilliance.eibs.core.model.IServiceDef;
import com.brilliance.eibs.factory.FactoryManager;
import com.brilliance.eibs.factory.parser.ConfigParser;
import com.brilliance.eibs.factory.parser.ParserFactory;
import com.brilliance.eibs.main.Server;
import com.brilliance.eibs.server.IServerInstance;
import com.brilliance.eibs.util.LogUtil;
import com.brilliance.eibs.util.Serializable2FileUtil;
import org.slf4j.Logger;
import org.sss.common.model.IState;
import org.sss.common.model.IState.IStopCallback;
import java.util.List;
/**
* @author gechengyang
* @category 服务调用API
**/
public class ServerManagerUtil {
private static Logger logger = LogUtil.getLogger("services");
// private static Log logger = LogFactory.getLog("services");
/**
* 服务调用入口
*
* @param serviceId
* 服务ID
* @param stock
* 是否阻塞
* @param state
* BD服务关闭时的控制
* @param args
* 服务相关参数
**/
public static void service(final String serviceId, boolean stock, IState state, Object[] args) {
if (Server.servers.containsKey(serviceId)) {
logger.info("service id[" + serviceId + "] has been started");
return;
}
logger.info("service id[" + serviceId + "] will be started");
Server.dealBDHotDeploy();
state.setStopCallback(new IStopCallback() {
public void stop() {
logger.info("callback stop");
try {
IServerInstance server = Server.servers.get(serviceId);
server.close();
// / Server.servers.remove(serviceId);
removeServer(serviceId);
} catch (Exception e) {
logger.error("stop receiver error" + e.getMessage());
removeServer(serviceId);
}
}
});
logger.info("before to satart service....");
ConfigParser parser = ParserFactory.getInstance(logger);// 配置解析器
List<IServiceDef> serviceDefs = parser.getServiceDefs("services");// 获取所有服务定义
Serializable2FileUtil.writeObject(serviceDefs, "services");// 保存为序列化文件,用于热部署
try {
for (IServiceDef serviceDef : serviceDefs)// 启动services
{
if (serviceId.equals(serviceDef.getId())) {
if (serviceDef.getState().equals("on") && !Server.servers.containsKey(serviceId)) {
Server.startServer(serviceDef, args);
}
}
}
// 初始化内存
Server.initBeanFactoryMemory(parser, FactoryManager.getBeanFactory());
} catch (Exception e) {
e.printStackTrace();
removeServer(serviceId);
}
}
public static void removeServer(String serviceId) {
IServerInstance serverInstance = Server.servers.get(serviceId);
Server.servers.remove(serviceId);
if (serverInstance != null)
serverInstance = null;
}
}
package com.brilliance.eibs.server.manager;
import org.apache.commons.io.IOUtils;
import org.sss.common.model.IStream;
import java.io.*;
public class StreamImpl
implements IStream
{
InputStream is;
InputStream bzis;
@SuppressWarnings("unused")
private StreamImpl()
{
}
public StreamImpl(File file)
throws IOException
{
this.is = new FileInputStream(file);
}
public StreamImpl(InputStream is)
{
this.is = is;
}
public InputStream getInputStream()
throws IOException
{
return this.is;
}
public OutputStream getOutputStream()
throws IOException
{
throw new UnsupportedOperationException();
}
public InputStream getCompressedInputStream()
throws IOException
{
return null;
}
public OutputStream getCompressedOutputStream()
throws IOException
{
throw new UnsupportedOperationException();
}
public boolean isEmpty()
{
try
{
return this.is.available() == 0;
}
catch (Exception localException) {
}
return true;
}
public String getValue()
{
throw new UnsupportedOperationException();
}
public String setValue(String value)
{
throw new UnsupportedOperationException();
}
public String getName()
{
throw new UnsupportedOperationException();
}
public void setName(String name)
{
throw new UnsupportedOperationException();
}
public String getType()
{
throw new UnsupportedOperationException();
}
public void setType(String type)
{
throw new UnsupportedOperationException();
}
public void close()
{
if (this.bzis != null)
IOUtils.closeQuietly(this.bzis);
this.bzis = null;
IOUtils.closeQuietly(this.is);
}
}
package com.brilliance.eibs.server.manager;
import com.brilliance.eibs.core.model.ITaskDef;
import com.brilliance.eibs.factory.FactoryManager;
import com.brilliance.eibs.factory.parser.ConfigParser;
import com.brilliance.eibs.factory.parser.ParserFactory;
import com.brilliance.eibs.main.Server;
import com.brilliance.eibs.quartz.CronTask;
import com.brilliance.eibs.util.LogUtil;
import com.brilliance.eibs.util.Serializable2FileUtil;
import org.slf4j.Logger;
import org.sss.common.model.IState;
import org.sss.common.model.IState.IStopCallback;
import java.util.List;
/**
* @author gechengyang
* @category 服务调用API
**/
public class TaskManagerUtil {
private static Logger logger = LogUtil.getLogger("services");
/**
* 定时任务用入口是
*
* @param taskId
* 服务ID
* @param stock
* 是否阻塞
* @param state
* BD服务关闭时的控制
* @param args
* 服务相关参数
**/
public static boolean task(final String taskId, boolean stock, IState state, Object[] args) {
if (Server.taskMap.containsKey(taskId)) {
logger.info("task id[" + taskId + "] has been started");
return true;
}
logger.info("task id[" + taskId + "] will be started");
Server.dealBDHotDeploy();
if (null != state)
state.setStopCallback(new IStopCallback() {
public void stop() {
logger.info("callback stop");
try {
CronTask task = Server.taskMap.get(taskId);
Server.closeTask(taskId);
} catch (Exception e) {
logger.error("stop task error" + e.getMessage());
Server.closeTask(taskId);
}
}
});
logger.info("before to satart task....");
ConfigParser parser = ParserFactory.getInstance(logger);// 配置解析器
List<ITaskDef> taskDefs = parser.getTaskDefs("services");// 获取所有服务定义
Serializable2FileUtil.writeObject(taskDefs, "tasks");// 保存为序列化文件,用于热部署
try {
for (ITaskDef taskDef : taskDefs)// 启动services
{
if (taskId.equals(taskDef.getId())) {
if (taskDef.getState().equals("on") && !Server.taskMap.containsKey(taskId))
Server.startTask(taskDef, args);
}
}
// 初始化内存
Server.initBeanFactoryMemory(parser, FactoryManager.getBeanFactory());
} catch (Exception e) {
e.printStackTrace();
Server.closeTask(taskId);
return false;
}
return true;
}
public static boolean task(final String taskId, boolean stock, Object[] args) {
return task(taskId, stock, null, args);
}
public static void removeTask(String taskId) {
Server.closeTask(taskId);
}
public static boolean isStarted(String taskId) {
return Server.taskMap.containsKey(taskId);
}
}
package com.brilliance.eibs.util;
import com.brilliance.eibs.server.manager.StreamImpl;
import org.sss.common.model.IStream;
import java.io.ByteArrayInputStream;
/**
* BD中的一些函数操作
* **/
public class BdUtil
{
/**
* 返回Istream对象
* **/
public static IStream iStream(byte[] buffer)
{
IStream is = new StreamImpl(new ByteArrayInputStream(buffer));
return is;
}
public static void main(String[] args)
{
System.out.println(BdUtil.iStream("12345".getBytes()));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment