本文整理汇总了Java中org.apache.axis2.clustering.ClusteringCommand类的典型用法代码示例。如果您正苦于以下问题:Java ClusteringCommand类的具体用法?Java ClusteringCommand怎么用?Java ClusteringCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClusteringCommand类属于org.apache.axis2.clustering包,在下文中一共展示了ClusteringCommand类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendToSelf
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
public void sendToSelf(ClusteringCommand msg) throws ClusteringFault {
if (channel == null) {
return;
}
try {
channel.send(new Member[]{channel.getLocalMember(true)},
toByteMessage(msg),
Channel.SEND_OPTIONS_USE_ACK |
Channel.SEND_OPTIONS_BYTE_MESSAGE);
if (log.isDebugEnabled()) {
log.debug("Sent " + msg + " to self");
}
} catch (Exception e) {
throw new ClusteringFault(e);
}
}
示例2: toByteMessage
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
private ByteMessage toByteMessage(ClusteringCommand msg) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bos);
out.writeObject(msg);
out.flush();
out.close();
return new ByteMessage(bos.toByteArray());
}
示例3: getTaskStateFromLocalCluster
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
private TaskState getTaskStateFromLocalCluster(String taskName) throws TaskException {
/* first check local server */
if (this.isTaskRunning(taskName)) {
return TaskState.BLOCKED;
}
ClusteringAgent agent = this.getClusteringAgent();
if (agent == null) {
return TaskState.UNKNOWN;
}
TaskStatusMessage msg = new TaskStatusMessage();
msg.setTaskName(taskName);
msg.setTaskType(this.getTaskType());
msg.setTenantId(this.getTenantId());
try {
List<ClusteringCommand> result = agent.sendMessage(msg, true);
TaskStatusResult status;
for (ClusteringCommand entry : result) {
status = (TaskStatusResult) entry;
if (status.isRunning()) {
return TaskState.BLOCKED;
}
}
return TaskState.NORMAL;
} catch (ClusteringFault e) {
throw new TaskException(e.getMessage(), Code.UNKNOWN, e);
}
}
示例4: getResponse
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
@Override
public ClusteringCommand getResponse() {
return null;
}
示例5: getResponse
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
@Override
public ClusteringCommand getResponse() {
return null;
}
示例6: sendToGroup
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
public void sendToGroup(ClusteringCommand msg) throws ClusteringFault {
sendToGroup(msg, this.membershipManager, 0);
}
示例7: getResponse
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
@Override
public ClusteringCommand getResponse() {
return this.result;
}
示例8: getResponse
import org.apache.axis2.clustering.ClusteringCommand; //导入依赖的package包/类
@Override
public ClusteringCommand getResponse() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}