📄 mathresource.java
字号:
/* * This file is licensed under the terms of the Globus Toolkit Public License * v3, found at http://www.globus.org/toolkit/legal/4.0/license-v3.html. * * This notice must appear in redistributions of this file, with or without * modification. */package org.globus.examples.services.security.first.impl;import org.globus.wsrf.Resource;import org.globus.wsrf.ResourceProperties;import org.globus.wsrf.ResourceProperty;import org.globus.wsrf.ResourcePropertySet;import org.globus.wsrf.impl.ReflectionResourceProperty;import org.globus.wsrf.impl.SimpleResourcePropertySet;public class MathResource implements Resource, ResourceProperties { /* Resource Property set */ private ResourcePropertySet propSet; /* Resource properties */ private int value; private String lastOp; /* Initializes RPs */ public void initialize() throws Exception { this.propSet = new SimpleResourcePropertySet( MathConstants.RESOURCE_PROPERTIES); ResourceProperty valueRP = new ReflectionResourceProperty( MathConstants.RP_VALUE, "Value", this); this.propSet.add(valueRP); setValue(0); ResourceProperty lastOpRP = new ReflectionResourceProperty( MathConstants.RP_LASTOP, "LastOp", this); this.propSet.add(lastOpRP); setLastOp("NONE"); } /* Get/Setters for the RPs */ public int getValue() { return value; } public synchronized void setValue(int value) { this.value = value; } public String getLastOp() { return lastOp; } public synchronized void setLastOp(String lastOp) { this.lastOp = lastOp; } /* Required by interface ResourceProperties */ public ResourcePropertySet getResourcePropertySet() { return this.propSet; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -