rename fct hub -> ZeppelinHub

This commit is contained in:
Anthony Corbacho 2016-05-11 15:13:04 +09:00 committed by Khalid Huseynov
parent 4c47e43116
commit 27a4042e12
2 changed files with 9 additions and 9 deletions

View file

@ -173,14 +173,14 @@ public class ZeppelinhubClient {
LOG.error("Message OP from ZeppelinHub isn't string {}", hubMsg.op);
return;
}
if (ZeppelinhubUtils.isHubOp(op)) {
handleHubOpMsg(ZeppelinhubUtils.stringToHubOp(op), hubMsg, message);
if (ZeppelinhubUtils.isZeppelinHubOp(op)) {
handleZeppelinHubOpMsg(ZeppelinhubUtils.toZeppelinHubOp(op), hubMsg, message);
} else if (ZeppelinhubUtils.isZeppelinOp(op)) {
forwardToZeppelin(ZeppelinhubUtils.stringToZeppelinOp(op), hubMsg);
forwardToZeppelin(ZeppelinhubUtils.toZeppelinOp(op), hubMsg);
}
}
private void handleHubOpMsg(ZeppelinHubOp op, ZeppelinhubMessage hubMsg, String msg) {
private void handleZeppelinHubOpMsg(ZeppelinHubOp op, ZeppelinhubMessage hubMsg, String msg) {
if (op == null || msg.equals(ZeppelinhubMessage.EMPTY)) {
LOG.error("Cannot handle empty op or msg");
return;

View file

@ -68,7 +68,7 @@ public class ZeppelinhubUtils {
.serialize();
}
public static ZeppelinHubOp stringToHubOp(String text) {
public static ZeppelinHubOp toZeppelinHubOp(String text) {
ZeppelinHubOp hubOp = null;
try {
hubOp = ZeppelinHubOp.valueOf(text);
@ -78,11 +78,11 @@ public class ZeppelinhubUtils {
return hubOp;
}
public static boolean isHubOp(String text) {
return (stringToHubOp(text) != null);
public static boolean isZeppelinHubOp(String text) {
return (toZeppelinHubOp(text) != null);
}
public static Message.OP stringToZeppelinOp(String text) {
public static Message.OP toZeppelinOp(String text) {
Message.OP zeppelinOp = null;
try {
zeppelinOp = Message.OP.valueOf(text);
@ -93,6 +93,6 @@ public class ZeppelinhubUtils {
}
public static boolean isZeppelinOp(String text) {
return (stringToZeppelinOp(text) != null);
return (toZeppelinOp(text) != null);
}
}