Skip to content

Commit

Permalink
fixed ivy
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Oct 15, 2023
1 parent 6d7c264 commit 0574c5c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
18 changes: 9 additions & 9 deletions src/main/java/org/myrobotlab/framework/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -725,27 +725,27 @@ public void addListener(MRLListener listener) {
}

@Override
public void addListener(String topicMethod, String callbackName) {
addListener(topicMethod, callbackName, CodecUtils.getCallbackTopicName(topicMethod));
public void addListener(String localMethod, String remoteName) {
addListener(localMethod, remoteName, CodecUtils.getCallbackTopicName(localMethod));
}

/**
* adds a MRL message listener to this service this is the result of a
* "subscribe" from a different service FIXME !! - implement with HashMap or
* HashSet .. WHY ArrayList ???
*
* @param topicMethod
* @param localMethod
* - method when called, it's return will be sent to the
* callbackName/calbackMethod
* @param callbackName
* remoteName.remoteMethod
* @param remoteName
* - name of the service to send return message to
* @param callbackMethod
* @param remoteMethod
* - name of the method to send return data to
*/
@Override
public void addListener(String topicMethod, String callbackName, String callbackMethod) {
callbackName = CodecUtils.getFullName(callbackName);
MRLListener listener = new MRLListener(topicMethod, callbackName, callbackMethod);
public void addListener(String localMethod, String remoteName, String remoteMethod) {
remoteName = CodecUtils.getFullName(remoteName);
MRLListener listener = new MRLListener(localMethod, remoteName, remoteMethod);
if (outbox.notifyList.containsKey(listener.topicMethod)) {
// iterate through all looking for duplicate
boolean found = false;
Expand Down
10 changes: 3 additions & 7 deletions src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,13 +520,9 @@ synchronized public void install(String location, String[] serviceTypes) throws
// IvyPatternHelper.substitute("[originalname].[ext]",
// artifact);

ArtifactDownloadReport[] artifacts = report.getAllArtifactsReports();
for (int i = 0; i < artifacts.length; ++i) {
ArtifactDownloadReport ar = artifacts[i];
Artifact artifact = ar.getArtifact();
// String filename =
// IvyPatternHelper.substitute("[originalname].[ext]",
// artifact);
File file = ar.getLocalFile();
String filename = file.getAbsoluteFile().getAbsolutePath();
log.info("{}", filename);

if ("zip".equalsIgnoreCase(artifact.getExt())) {
info("unzipping %s", filename);
Expand Down

0 comments on commit 0574c5c

Please sign in to comment.