Package org.openmuc.jdlms
Interface DlmsInvocationContext
-
public interface DlmsInvocationContext
Exposes context information about the intercepted invocation and operations that enable interceptor methods to control the behavior of the invocation of an xDLMS action/ COSEM attribute or method access.public DataObject intercept(DlmsInvocationContext ctx) throws DlmsAccessException { ctx.get.. ... DataObject res = ctx.proceed(); ... return res; }
- See Also:
DlmsInterceptor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DlmsInvocationContext.XDlmsServiceType
The invocation type (service).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CosemResourceDescriptor
getCosemResourceDescriptor()
Get the COSEM resource descriptor.java.lang.reflect.Member
getMember()
The member eitherMethod
orField
which is being accessed.java.lang.Object[]
getParameters()
Get the parameters of the method which is going to be invoked.SecuritySuite.SecurityPolicy
getSecurityPolicy()
The policy in which the client is invoking the xDLMS service.CosemInterfaceObject
getTarget()
Get the target object of the xDLMS service invokation.DlmsInvocationContext.XDlmsServiceType
getXDlmsServiceType()
The type of invocation.DataObject
proceed()
Invoke the actual COSEM resource.void
setParameters(java.lang.Object[] params)
Change the parameter of the invocation.
-
-
-
Method Detail
-
getTarget
CosemInterfaceObject getTarget()
Get the target object of the xDLMS service invokation.- Returns:
- the target class.
-
getParameters
java.lang.Object[] getParameters()
Get the parameters of the method which is going to be invoked. This may be empty in the case of a GET invocation.- Returns:
- the parameters of the access.
-
setParameters
void setParameters(java.lang.Object[] params)
Change the parameter of the invocation.- Parameters:
params
- the new parameters.- Throws:
java.lang.IllegalArgumentException
- if the new params don't match the type of the original method/field.
-
getCosemResourceDescriptor
CosemResourceDescriptor getCosemResourceDescriptor()
Get the COSEM resource descriptor.- Returns:
- the resource descriptor.
-
getMember
java.lang.reflect.Member getMember()
The member eitherMethod
orField
which is being accessed.NOTE: if getXDlmsServiceType() is DlmsInvocationContext.XDlmsServiceType.ACTION the member must be an Method.
- Returns:
- the member.
-
getXDlmsServiceType
DlmsInvocationContext.XDlmsServiceType getXDlmsServiceType()
The type of invocation.- Returns:
- the xDLMS service type.
-
getSecurityPolicy
SecuritySuite.SecurityPolicy getSecurityPolicy()
The policy in which the client is invoking the xDLMS service.- Returns:
- the security policy.
-
proceed
DataObject proceed() throws DlmsAccessException
Invoke the actual COSEM resource. This may be null.NOTE: The result of the invocation must be returned at DlmsInterceptor.intercept(DlmsInvocationContext)
- Returns:
- the return value of the next method in the chain.
- Throws:
DlmsAccessException
- if the call of the method throws aDlmsAccessException
.
-
-