init
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
//package com.ext.eai.agent.fds;
|
||||
//
|
||||
//import com.eactive.eai.agent.command.Command;
|
||||
//import com.eactive.eai.agent.command.CommandException;
|
||||
//import com.eactive.eai.common.util.Logger;
|
||||
//import com.ext.eai.fds.FDSManager;
|
||||
//
|
||||
//public class ReloadFDSCommand extends Command
|
||||
//{
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /**
|
||||
// * 1. 기능 : ReloadFDSCommand 생성자
|
||||
// * 2. 처리 개요 :
|
||||
// * 3. 주의사항
|
||||
// *
|
||||
// * @param
|
||||
// * @return
|
||||
// * @exception
|
||||
// **/
|
||||
// public ReloadFDSCommand() {
|
||||
// super("ReloadFDSCommand");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 1. 기능 : FDSManager의 데이터를 DB로부터 Reload
|
||||
// * 2. 처리 개요 : FDSManager의 reload메소드를 실행하여 DB로부터 Reload
|
||||
// * 3. 주의사항
|
||||
// *
|
||||
// * @param
|
||||
// * @return
|
||||
// * @exception CommandException
|
||||
// **/
|
||||
// public Object execute() throws CommandException
|
||||
// {
|
||||
// Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
// if (logger.isInfo()) logger.info(this.name + " is executed");
|
||||
//
|
||||
// if( !(args instanceof String) ) {
|
||||
// String rspErrorCode = "RECEAIMCM001";
|
||||
// String msg = makeException(rspErrorCode, null);
|
||||
// if (logger.isError()) logger.error(msg);
|
||||
// throw new CommandException(msg);
|
||||
// }
|
||||
//
|
||||
// try{
|
||||
// FDSManager manager = FDSManager.getInstance();
|
||||
// String keyName = (String)args;
|
||||
// if(keyName != null ){
|
||||
// if( "ALL".equals(keyName)){
|
||||
// manager.reload();
|
||||
// if(logger.isWarn())
|
||||
// logger.warn(this.name + "] 모든 정보가 Reload 되었습니다.");
|
||||
// }else{
|
||||
// throw new Exception("not support args " + keyName );
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(logger.isWarn()) logger.warn(this.name + "] 모든 정보가 Reload 되었습니다.");
|
||||
// }catch (Exception e){
|
||||
// String rspErrorCode = "RECEAIMCM002";
|
||||
// String msg = makeException(rspErrorCode, e);
|
||||
// if (logger.isError()) logger.error(msg);
|
||||
//// e.printStackTrace();
|
||||
// throw new CommandException(msg);
|
||||
// }
|
||||
// return "success";
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.ext.eai.agent.stdmessage;
|
||||
|
||||
import com.eactive.eai.agent.command.Command;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.stdmessage.STDMessageManager;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
public class ReloadSTDMessageCommand extends Command
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 1. 기능 : ReloadSTDMessageCommand 생성자
|
||||
* 2. 처리 개요 :
|
||||
* 3. 주의사항
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @exception
|
||||
**/
|
||||
public ReloadSTDMessageCommand() {
|
||||
super("ReloadSTDMessageCommand");
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. 기능 : STDMessageManager의 데이터를 DB로부터 Reload
|
||||
* 2. 처리 개요 : STDMessageManager의 reload메소드를 실행하여 DB로부터 Reload
|
||||
* 3. 주의사항
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @exception CommandException
|
||||
**/
|
||||
public Object execute() throws CommandException
|
||||
{
|
||||
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
if (logger.isInfo()) logger.info(this.name + " is executed");
|
||||
|
||||
if( !(args instanceof String) ) {
|
||||
String rspErrorCode = "RECEAIMCM001";
|
||||
String msg = makeException(rspErrorCode, null);
|
||||
if (logger.isError()) logger.error(msg);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
|
||||
try{
|
||||
STDMessageManager manager = STDMessageManager.getInstance();
|
||||
|
||||
String keyName = (String)args;
|
||||
|
||||
if(keyName != null ){
|
||||
if( "ALL".equals(keyName)){
|
||||
manager.reload();
|
||||
if(logger.isWarn())
|
||||
logger.warn(this.name + "] 모든 정보가 Reload 되었습니다.");
|
||||
}
|
||||
else {
|
||||
manager.reload(keyName);
|
||||
if(logger.isWarn())
|
||||
logger.warn(this.name + "] "+keyName+" 에 대한 정보가 Reload 되었습니다.");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
String rspErrorCode = "RECEAIMCM002";
|
||||
String msg = makeException(rspErrorCode, e);
|
||||
if (logger.isError()) logger.error(msg);
|
||||
// e.printStackTrace();
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
// public static void main(String args[]) throws Exception {
|
||||
// test();
|
||||
//}
|
||||
|
||||
// private static void test() throws Exception {
|
||||
// Command command = new ReloadSTDMessageCommand();
|
||||
// command.setArgs("ALL");
|
||||
// AgentUtil.broadcast(command);
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.ext.eai.agent.stdmessage;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import com.eactive.eai.agent.command.Command;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.stdmessage.STDMessageManager;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
public class ReloadSTDMessageListCommand extends Command
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 1. 기능 : ReloadSTDMessageCommand 생성자
|
||||
* 2. 처리 개요 :
|
||||
* 3. 주의사항
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @exception
|
||||
**/
|
||||
public ReloadSTDMessageListCommand() {
|
||||
super("ReloadSTDMessageListCommand");
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. 기능 : STDMessageManager의 데이터를 DB로부터 Reload
|
||||
* 2. 처리 개요 : STDMessageManager의 reload메소드를 실행하여 DB로부터 Reload
|
||||
* 3. 주의사항
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
* @exception CommandException
|
||||
**/
|
||||
public Object execute() throws CommandException
|
||||
{
|
||||
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
if (logger.isInfo()) logger.info(this.name + " is executed");
|
||||
|
||||
if( !(args instanceof Vector) ) {
|
||||
String rspErrorCode = "RECEAIMCM001";
|
||||
String msg = makeException(rspErrorCode, null);
|
||||
if (logger.isError()) logger.error(msg);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
|
||||
try{
|
||||
STDMessageManager manager = STDMessageManager.getInstance();
|
||||
|
||||
Vector messageVt = (Vector)args;
|
||||
String key = "";
|
||||
for(int i=0; i<messageVt.size(); i++) {
|
||||
key = (String)messageVt.get(i);
|
||||
|
||||
if(key != null ){
|
||||
manager.reload(key);
|
||||
if(logger.isWarn())
|
||||
logger.warn(this.name + "] "+key+" 에 대한 정보가 Reload 되었습니다.");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
String rspErrorCode = "RECEAIMCM002";
|
||||
String msg = makeException(rspErrorCode, e);
|
||||
if (logger.isError()) logger.error(msg, e);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
// public static void main(String args[]) throws Exception {
|
||||
// test();
|
||||
//}
|
||||
|
||||
// private static void test() throws Exception {
|
||||
// Command command = new ReloadSTDMessageListCommand();
|
||||
// command.setArgs("ALL");
|
||||
// AgentUtil.broadcast(command);
|
||||
//
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.ext.eai.agent.stdmessage;
|
||||
|
||||
import com.eactive.eai.agent.command.Command;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.stdmessage.STDMessageManager;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
/**
|
||||
* 1. 기능 : Running중인 EAI Server의 메모리에 로딩된 STDMessageManager의 정보 변경
|
||||
* 2. 처리 개요 : STDMessageManager에서 해당 STDMessage를 제거
|
||||
* 3. 주의사항
|
||||
*
|
||||
* @author
|
||||
* @version v 1.0.0
|
||||
* @see 관련 기능을 참조
|
||||
* @since
|
||||
*/
|
||||
public class RemoveSTDMessageCommand extends Command
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 1. 기능 : RemoveSTDMessageCommand 생성자
|
||||
* 2. 처리 개요 :
|
||||
* 3. 주의사항
|
||||
*
|
||||
**/
|
||||
public RemoveSTDMessageCommand() {
|
||||
super("RemoveSTDMessageCommand");
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. 기능 : STDMessageManager에서 해당 STDMessage를 제거
|
||||
* 2. 처리 개요 : STDMessageManager에서 해당 STDMessage를 제거
|
||||
* 3. 주의사항
|
||||
*
|
||||
* @exception CommandException Argument Type이 다르거나 Command 수행중 Excpetion이 발생할 경우
|
||||
**/
|
||||
public Object execute() throws CommandException
|
||||
{
|
||||
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
if (logger.isInfo()) logger.info(this.name + " is executed");
|
||||
|
||||
if( !(args instanceof String) ) {
|
||||
String rspErrorCode = "RECEAIMCM001";
|
||||
String msg = makeException(rspErrorCode, null);
|
||||
if (logger.isError()) logger.error(msg);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
|
||||
try{
|
||||
|
||||
String bwkSvcKey = null;
|
||||
STDMessageManager manager = STDMessageManager.getInstance();
|
||||
|
||||
bwkSvcKey = (String) args;
|
||||
if(bwkSvcKey != null){
|
||||
manager.removeSTDMessage(bwkSvcKey);
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
String rspErrorCode = "RECEAIMCM002";
|
||||
String msg = makeException(rspErrorCode, e);
|
||||
if (logger.isError()) logger.error(msg, e);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ext.eai.agent.submessage;
|
||||
|
||||
import com.eactive.eai.agent.command.Command;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.submessage.SubMessageManager;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
public class ReloadSubMessageCommand extends Command {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ReloadSubMessageCommand() {
|
||||
super("ReloadSubMessageCommand");
|
||||
}
|
||||
|
||||
public Object execute() throws CommandException {
|
||||
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
if (logger.isInfo())
|
||||
logger.info(this.name + " is executed");
|
||||
|
||||
if (!(args instanceof String)) {
|
||||
String rspErrorCode = "RECEAIMCM001";
|
||||
String msg = makeException(rspErrorCode, null);
|
||||
if (logger.isError())
|
||||
logger.error(msg);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
|
||||
try {
|
||||
SubMessageManager manager = SubMessageManager.getInstance();
|
||||
String keyName = (String) args;
|
||||
if (keyName != null) {
|
||||
if ("ALL".equals(keyName)) {
|
||||
manager.reload();
|
||||
if (logger.isWarn())
|
||||
logger.warn(this.name + "] 모든 정보가 Reload 되었습니다.");
|
||||
} else {
|
||||
manager.reload(keyName);
|
||||
if (logger.isWarn())
|
||||
logger.warn(this.name + "] " + keyName + " 에 대한 정보가 Reload 되었습니다.");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String rspErrorCode = "RECEAIMCM002";
|
||||
String msg = makeException(rspErrorCode, e);
|
||||
if (logger.isError())
|
||||
logger.error(msg);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
// public static void main(String args[]) throws Exception {
|
||||
// test();
|
||||
//}
|
||||
|
||||
// private static void test() throws Exception {
|
||||
// Command command = new ReloadSubMessageCommand();
|
||||
// command.setArgs("ALL");
|
||||
// AgentUtil.broadcast(command);
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ext.eai.agent.submessage;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import com.eactive.eai.agent.command.Command;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.submessage.SubMessageManager;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
public class ReloadSubMessageListCommand extends Command {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ReloadSubMessageListCommand() {
|
||||
super("ReloadSubMessageListCommand");
|
||||
}
|
||||
|
||||
public Object execute() throws CommandException {
|
||||
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
if (logger.isInfo())
|
||||
logger.info(this.name + " is executed");
|
||||
|
||||
if (!(args instanceof Vector)) {
|
||||
String rspErrorCode = "RECEAIMCM001";
|
||||
String msg = makeException(rspErrorCode, null);
|
||||
if (logger.isError())
|
||||
logger.error(msg);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
|
||||
try {
|
||||
SubMessageManager manager = SubMessageManager.getInstance();
|
||||
|
||||
Vector messageVt = (Vector) args;
|
||||
String key = "";
|
||||
for (int i = 0; i < messageVt.size(); i++) {
|
||||
key = (String) messageVt.get(i);
|
||||
|
||||
if (key != null) {
|
||||
manager.reload(key);
|
||||
if (logger.isWarn())
|
||||
logger.warn(this.name + "] " + key + " 에 대한 정보가 Reload 되었습니다.");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String rspErrorCode = "RECEAIMCM002";
|
||||
String msg = makeException(rspErrorCode, e);
|
||||
if (logger.isError())
|
||||
logger.error(msg, e);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
// public static void main(String args[]) throws Exception {
|
||||
// test();
|
||||
//}
|
||||
|
||||
// private static void test() throws Exception {
|
||||
// Command command = new ReloadSubMessageListCommand();
|
||||
// command.setArgs("ALL");
|
||||
// AgentUtil.broadcast(command);
|
||||
//
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.ext.eai.agent.submessage;
|
||||
|
||||
import com.eactive.eai.agent.command.Command;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.submessage.SubMessageManager;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
public class RemoveSubMessageCommand extends Command {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public RemoveSubMessageCommand() {
|
||||
super("RemoveSubMessageCommand");
|
||||
}
|
||||
|
||||
public Object execute() throws CommandException {
|
||||
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||
if (logger.isInfo())
|
||||
logger.info(this.name + " is executed");
|
||||
|
||||
if (!(args instanceof String)) {
|
||||
String rspErrorCode = "RECEAIMCM001";
|
||||
String msg = makeException(rspErrorCode, null);
|
||||
if (logger.isError())
|
||||
logger.error(msg);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
String bwkSvcKey = null;
|
||||
SubMessageManager manager = SubMessageManager.getInstance();
|
||||
|
||||
bwkSvcKey = (String) args;
|
||||
if (bwkSvcKey != null) {
|
||||
manager.remove(bwkSvcKey);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
String rspErrorCode = "RECEAIMCM002";
|
||||
String msg = makeException(rspErrorCode, e);
|
||||
if (logger.isError())
|
||||
logger.error(msg, e);
|
||||
throw new CommandException(msg);
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user