git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added getStatus() method and now also testing for the correct status.
[utils]
/
trunk
/
system
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
system
/
DefaultService.java
diff --git
a/trunk/system/general/src/main/java/org/wamblee/system/DefaultService.java
b/trunk/system/general/src/main/java/org/wamblee/system/DefaultService.java
index fb2128ee940664966bd31ba41c26d9be79b017ea..dc266223d4699724895f1e7d2778d39ac66c2bf0 100644
(file)
--- a/
trunk/system/general/src/main/java/org/wamblee/system/DefaultService.java
+++ b/
trunk/system/general/src/main/java/org/wamblee/system/DefaultService.java
@@
-2,34
+2,47
@@
package org.wamblee.system;
/**
* Default service implementation.
/**
* Default service implementation.
+ *
+ * @author Erik Brakkee
*/
public class DefaultService implements Service {
*/
public class DefaultService implements Service {
-
- private ServiceDescriptor _descriptor;
- private Object _service;
-
+
+ private String _id;
+ private ProvidedInterfaceDescriptor _descriptor;
+ private Object _service;
+
/**
/**
- * Constructs the service.
- * @param aDescriptor Descriptor to use.
- * @param aService Service.
+ * Constructs the service.
+ *
+ * @param aDescriptor
+ * Descriptor to use.
+ * @param aService
+ * Service.
*/
*/
- public DefaultService(ServiceDescriptor aDescriptor, Object aService) {
- _descriptor = aDescriptor;
+ public DefaultService(String aId, ProvidedInterfaceDescriptor aDescriptor,
+ Object aService) {
+ _id = aId;
+ _descriptor = aDescriptor;
_service = aService;
}
@Override
_service = aService;
}
@Override
- public ServiceDescriptor getDescriptor() {
- return _descriptor;
+ public String getId() {
+ return _id;
+ }
+
+ @Override
+ public ProvidedInterfaceDescriptor getDescriptor() {
+ return _descriptor;
}
@Override
public <T> T reference(Class<T> aClass) {
}
@Override
public <T> T reference(Class<T> aClass) {
- return (T)
_service;
+ return (T)
_service;
}
@Override
public String toString() {
}
@Override
public String toString() {
- return "(" + _descriptor + ", " + _service + ")";
+ return "(" + _descriptor + ", " + _service + ")";
}
}
}
}