public class CameraCallback_Skeleton implements CameraCallback {
private CameraCallback mainObj;
- private int objectId = 0;
+ private int objectId = 3;
// Communications and synchronizations
private IoTRMIComm rmiComm;
private AtomicBoolean didAlreadyInitWaitInvoke;
private AtomicBoolean methodReceived;
private byte[] methodBytes = null;
// Permissions
- private final static int object0Id = 0; //CameraSmartCallback
- private static Integer[] object0Permission = { 0 };
- private static List<Integer> set0Allowed;
+ private static Integer[] object3Permission = { 0 };
+ private static List<Integer> set3Allowed;
public CameraCallback_Skeleton(CameraCallback _mainObj, int _portSend, int _portRecv) throws Exception {
mainObj = _mainObj;
rmiComm = new IoTRMICommServer(_portSend, _portRecv);
- set0Allowed = new ArrayList<Integer>(Arrays.asList(object0Permission));
+ set3Allowed = new ArrayList<Integer>(Arrays.asList(object3Permission));
IoTRMIUtil.mapSkel.put(_mainObj, this);
IoTRMIUtil.mapSkelId.put(_mainObj, objectId);
didAlreadyInitWaitInvoke = new AtomicBoolean(false);
mainObj = _mainObj;
rmiComm = _rmiComm;
objectId = _objectId;
- set0Allowed = new ArrayList<Integer>(Arrays.asList(object0Permission));
+ set3Allowed = new ArrayList<Integer>(Arrays.asList(object3Permission));
didAlreadyInitWaitInvoke = new AtomicBoolean(false);
methodReceived = new AtomicBoolean(false);
rmiComm.registerSkeleton(objectId, methodReceived);
int _objectId = IoTRMIComm.getObjectId(methodBytes);
int methodId = IoTRMIComm.getMethodId(methodBytes);
if (_objectId == objectId) {
- if (!set0Allowed.contains(methodId)) {
+ if (!set3Allowed.contains(methodId)) {
throw new Error("Object with object Id: " + _objectId + " is not allowed to access method: " + methodId);
}
}