public interface ServiceWrapperDef extends ServiceDef
ServiceWrapper
should have public. The
wrapper needs to send certain requested information to its parent service, or to a server.
The required methods are implemented in the default ServiceWrapper
or ServiceWrapperLegacy
classes. Note that the service now also stores some metrics or the message passed to a service.Modifier and Type | Method and Description |
---|---|
void |
addMetrics(MethodInfo messageObj,
java.lang.String theAdminKey)
Add some metrics values relating to the current message.
|
void |
copyFromService()
Reset the wrapper settings based on the wrapped object if a service.
|
void |
copyToService(java.lang.Object parentService)
Copy and set certain settings between the service object and the wrapper.
|
org.licas_xml.abs.Element |
getDescription()
Get the description value.
|
org.licas_xml.abs.Element |
getFullPath()
Get the fully qualified uuid path back to the first parent object and server.
|
Metrics |
getMetrics()
Get the default message/transaction metrics.
|
java.lang.Class |
getObjClass()
Get the class type of the stored object.
|
java.lang.Object |
getObjService(java.lang.String adminKey)
Get the stored object service.
|
java.lang.String |
getServiceGrade()
Get the grade for this service.
|
WorkInfo |
getWorkInfo()
Get the work protocol details for the service.
|
java.lang.Object |
invokeObj(java.lang.reflect.Method theMethod,
java.lang.Object[] params)
Invoke the method on the stored object with the specified parameters.
|
java.util.ArrayList<java.lang.reflect.Method> |
reflectionMethods()
Get a list of public methods that can be accessed through the service.
|
void |
setObjService(java.lang.Object theObj)
Set the wrapped object that is typically derived from
Service ,
but can be a legacy object of any type. |
boolean |
storesLegacy()
Return true if the stored object is legacy code, false if a licas service.
|
canAccess, canAccessTemp, getServiceType, getUUID, isAdminKey, setJarFile, setServiceType, setUUID
boolean storesLegacy()
java.lang.String getServiceGrade()
org.licas_xml.abs.Element getDescription()
org.licas_xml.abs.Element getFullPath() throws java.lang.Exception
java.lang.Exception
- any error.WorkInfo getWorkInfo()
workInfo
details.java.lang.Object invokeObj(java.lang.reflect.Method theMethod, java.lang.Object[] params) throws java.lang.Exception
theMethod
- the method to invoke.params
- the parameter list.java.lang.Exception
- any error.void addMetrics(MethodInfo messageObj, java.lang.String theAdminKey)
messageObj
- the message object.theAdminKey
- the admin key for the parent service.Metrics getMetrics()
void copyToService(java.lang.Object parentService) throws java.lang.Exception
parentService
- the parent of the wrapper.java.lang.Exception
- any error.void copyFromService()
java.lang.Class getObjClass()
void setObjService(java.lang.Object theObj)
Service
,
but can be a legacy object of any type.theObj
- the value of obj.java.lang.Object getObjService(java.lang.String adminKey)
adminKey
- the admin key for the object or wrapper.java.util.ArrayList<java.lang.reflect.Method> reflectionMethods()