Here is the code pasted inline with the files separated by
============================================================================
package org.apache.jmeter.protocol.corba.sampler;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.apache.jmeter.config.ConfigTestElement;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jmeter.engine.event.LoopIterationEvent;
import org.apache.jmeter.samplers.AbstractSampler;
import org.apache.jmeter.samplers.Entry;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.testelement.TestListener;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
import org.omg.CosNaming.*;
import Pmcs.*;
//import org.apache.log4j.PropertyConfigurator;
//import org.apache.log4j.Logger;
//import org.apache.log4j.Priority;
/**
* A sampler which understands corba requests.
*
* @version
*/
public class CorbaSampler extends AbstractSampler implements TestListener {
private static final Logger log = LoggingManager.getLoggerForClass();
public final static String SERVER = "CorbaSampler.name_server";
public final static String PORT = "CorbaSampler.port";
public final static String DATAFILENAME = "CorbaSampler.fileName"; //
public final static String CLASSNAME = "CorbaSampler.classname"; //
public final static String METHOD = "CorbaSampler.method"; //
public final static String REQUEST = "CorbaSampler.request"; //
private CorbaInvoker corbaInvoker = new CorbaInvoker();
public CorbaSampler() {
log.debug("Created " + this);
}
private String getError() {
return (String) "ERROR";
}
public CorbaInvoker corbaInvoker() {
return corbaInvoker;
}
public void setServer(String newServer) {
this.setProperty(SERVER, newServer);
}
public String getServer() {
return getPropertyAsString(SERVER);
}
public void setPort(String newFilename) {
this.setProperty(PORT, newFilename);
}
public int getPort() {
return getPropertyAsInt(PORT);
}
public void setFilename(String newFilename) {
this.setProperty(DATAFILENAME, newFilename);
log.debug("setFilename:" + newFilename);
}
public String getFilename() {
return getPropertyAsString(DATAFILENAME);
}
public void setRequestData(String newRequestData) {
this.setProperty(REQUEST, newRequestData);
}
public String getRequestData() {
return getPropertyAsString(REQUEST);
}
public void setMethod(String newMethod) {
this.setProperty(METHOD, newMethod);
}
public String getMethod() {
return getPropertyAsString(METHOD);
}
/**
* Returns a formatted string label describing this sampler
* Example output:
* corba://corba.nowhere.com/pub/README.txt
*
* @return a formatted string label describing this sampler
*/
public String getLabel() {
return ("corba://" + this.getServer() + ":" + this.getPort());
//$NON-NLS-1$
}
private static String getClassname() {
String className = "CorbaSampler";
return className;
}
private static final String protoPrefix =
"org.apache.jmeter.protocol.corba.sampler.";
private Class getClass(String className) {
Class c = null;
try {
c = Class.forName(className
, false,
Thread.currentThread().getContextClassLoader());
} catch (ClassNotFoundException e) {
try {
c = Class.forName(protoPrefix + className
, false,
Thread.currentThread().getContextClassLoader());
} catch (ClassNotFoundException e1) {
log.error("Could not find protocol class " + className);
}
}
return c;
}
public SampleResult sample(Entry e) { // Entry tends to be ignored ...
log.debug(getLabel() + " " + getFilename() + " ");
log.debug(this.getMethod());
SampleResult res = new SampleResult();
boolean isSuccessful = false;
res.setSampleLabel(getName()); //Use the test element name for the
label
res.setSamplerData("Host: " + getServer() + " Port: " + getPort());
Object obj = null;
try {
log.debug("in sample(), getFilename():" + getFilename());
corbaInvoker().setInputDataFile(getFilename());
corbaInvoker.chooseMethodToInvoke(this.getMethod());
res.sampleStart();
obj = corbaInvoker.invoke(getMethod());
// Calculate response time
res.sampleEnd();
isSuccessful = true;
} catch (Exception ex) {
log.debug("", ex);
res.setResponseCode("ERROR");
res.setResponseMessage(ex.toString());
}
res.setResponseData(obj.toString().getBytes());
res.setDataType(SampleResult.TEXT);
res.setResponseCode("200");
res.setResponseMessage("OK");
log.debug("RESULT:" + obj.toString());
// Set if we were successful or not
res.setSuccessful(isSuccessful);
return res;
}
/* (non-Javadoc)
* @see org.apache.jmeter.testelement.TestListener#testStarted()
*/
public void testStarted() { // Only called once per class?
log.debug(this +" test started");
}
/* (non-Javadoc)
* @see org.apache.jmeter.testelement.TestListener#testEnded()
*/
public void testEnded() { // Only called once per class?
log.debug(this +" test ended");
}
/* (non-Javadoc)
* @see
org.apache.jmeter.testelement.TestListener#testStarted(java.lang.String)
*/
public void testStarted(String host) {
log.debug(this +" test started on " + host);
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see
org.apache.jmeter.testelement.TestListener#testEnded(java.lang.String)
*/
public void testEnded(String host) {
log.debug(this +" test ended on " + host);
}
/* (non-Javadoc)
* @see
org.apache.jmeter.testelement.TestListener#testIterationStart(org.apache.jme
ter.engine.event.LoopIterationEvent)
*/
public void testIterationStart(LoopIterationEvent event) {
log.debug(this +" test iteration start on " + event.getIteration());
// TODO Auto-generated method stub
}
}
============================================================================
// $Header:
/home/cvs/jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/con
fig/gui/TCPConfigGui.java,v 1.4.2.3 2004/06/12 20:30:03 sebb Exp $
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.jmeter.protocol.corba.config.gui;
import java.awt.BorderLayout;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import org.apache.jmeter.config.ConfigTestElement;
import org.apache.jmeter.config.gui.AbstractConfigGui;
import org.apache.jmeter.gui.util.VerticalPanel;
import org.apache.jmeter.protocol.corba.sampler.CorbaSampler;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.util.JOrphanUtils;
import javax.swing.filechooser.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
/**
* @version $Revision: 1.4.2.3 $ $Date: 2004/06/12 20:30:03 $
*/
public class CorbaConfigGui extends AbstractConfigGui implements
ActionListener {
private static final Logger log = LoggingManager.getLoggerForClass();
private final static String SERVER = "server"; //$NON-NLS-1$
private final static String PORT = "port"; //$NON-NLS-1$
private final static String DATAFILENAME = "fileName"; //$NON-NLS-1$
private final static String METHOD = "method"; //$NON-NLS-1$
private final static String REQUEST = "request"; //$NON-NLS-1$
private JTextField server;
private JTextField port;
private JTextField fileName;
private JComboBox methods;
String methodSelected;
private JTextArea requestData;
JButton openButton;
JFileChooser fc;
org.apache.jmeter.protocol.corba.sampler.CorbaSampler sampler;
private boolean displayName = true;
public CorbaConfigGui() {
this(true);
}
public CorbaConfigGui(boolean displayName) {
this.displayName = displayName;
init();
}
public String getLabelResource() {
return "corba_config_title";
}
public void configure(TestElement element) {
super.configure(element);
if (element instanceof org.apache.jmeter.protocol.corba.sampler.
CorbaSampler) {
sampler =
(org.apache.jmeter.protocol.corba.sampler.CorbaSampler)
element;
}
server.setText(element.getPropertyAsString(CorbaSampler.SERVER));
port.setText(element.getPropertyAsString(CorbaSampler.PORT));
requestData.setText(element.getPropertyAsString(CorbaSampler.REQUEST));
}
public TestElement createTestElement() {
ConfigTestElement element = new ConfigTestElement();
modifyTestElement(element);
return element;
}
/**
* Modifies a given TestElement to mirror the data in the gui
components.
* @see
org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
*/
public void modifyTestElement(TestElement element) {
configureTestElement(element);
element.setProperty(CorbaSampler.SERVER, server.getText());
element.setProperty(CorbaSampler.PORT, port.getText());
element.setProperty(CorbaSampler.DATAFILENAME, fileName.getText());
element.setProperty(CorbaSampler.METHOD, methodSelected);
element.setProperty(CorbaSampler.REQUEST, requestData.getText());
}
private JPanel createMethodsPanel() {
JLabel label = new
JLabel(JMeterUtils.getResString("corba_methods"));
methods = new JComboBox();
methods.setName(METHOD);
label.setLabelFor(methods);
JPanel methodsPanel = new JPanel(new BorderLayout(5, 0));
methodsPanel.add(label, BorderLayout.WEST);
methodsPanel.add(methods, BorderLayout.CENTER);
return methodsPanel;
}
private JPanel createFileChooserPanel() {
//Create a file chooser
fc = new JFileChooser("C:\\jakarta-jmeter-2.0.2\\src");
openButton = new JButton("Click to find input data file");
openButton.setToolTipText(
"Browse and select the property file containing input/config
data.");
openButton.addActionListener(this);
JLabel label = new JLabel(JMeterUtils.getResString(
"corba_input_data_file"));
fileName = new JTextField(10);
fileName.setName(DATAFILENAME);
label.setLabelFor(fileName);
JPanel filePanel = new JPanel(new BorderLayout(5, 0));
filePanel.add(label, BorderLayout.WEST);
filePanel.add(fileName, BorderLayout.CENTER);
JPanel fileChooserPanel = new JPanel(new BorderLayout(5, 0));
fileChooserPanel.add(openButton, BorderLayout.WEST);
fileChooserPanel.add(filePanel, BorderLayout.CENTER);
return fileChooserPanel;
}
private JPanel createServerPanel() {
JLabel label = new JLabel(JMeterUtils.getResString("server"));
server = new JTextField(10);
server.setName(SERVER);
label.setLabelFor(server);
JPanel serverPanel = new JPanel(new BorderLayout(5, 0));
serverPanel.add(label, BorderLayout.WEST);
serverPanel.add(server, BorderLayout.CENTER);
return serverPanel;
}
private JPanel createPortPanel() {
JLabel label = new JLabel(JMeterUtils.getResString("corba_port"));
port = new JTextField(10);
port.setName(PORT);
label.setLabelFor(port);
JPanel PortPanel = new JPanel(new BorderLayout(5, 0));
PortPanel.add(label, BorderLayout.WEST);
PortPanel.add(port, BorderLayout.CENTER);
return PortPanel;
}
private JPanel createRequestPanel() {
JLabel reqLabel = new JLabel(JMeterUtils.getResString(
"corba_request_data"));
requestData = new JTextArea(3, 0);
requestData.setLineWrap(true);
requestData.setName(REQUEST);
reqLabel.setLabelFor(requestData);
JPanel reqDataPanel = new JPanel(new BorderLayout(5, 0));
reqDataPanel.add(reqLabel, BorderLayout.WEST);
reqDataPanel.add(requestData, BorderLayout.CENTER);
return reqDataPanel;
}
private void init() {
setLayout(new BorderLayout(0, 5));
if (displayName) {
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
}
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.add(createFileChooserPanel());
mainPanel.add(createServerPanel());
mainPanel.add(createPortPanel());
mainPanel.add(createMethodsPanel());
mainPanel.add(createRequestPanel());
//mainPanel.add(createFilenamePanel());
add(mainPanel, BorderLayout.CENTER);
}
public void actionPerformed(ActionEvent e) {
//Handle open button action.
if (e.getSource() == openButton) {
int returnVal = fc.showOpenDialog(CorbaConfigGui.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
this.setFileName(file.getAbsolutePath());
log.debug("Opening file." + file.getName());
} else {
log.debug("Open command cancelled by user.");
}
}
}
public void setFileName(String fName) {
fileName.setText(fName);
sampler.setFilename(fName);
sampler.corbaInvoker().setInputDataFile(fName);
String ns[] = sampler.corbaInvoker().getNameServiceDetails();
server.setText(ns[0] + " " + ns[1]);
port.setText(ns[2]);
setMethod();
}
public void setMethod() {
methods.removeAllItems();
String[] methodNames = sampler.corbaInvoker().getMethodNames();
methods.addItem(">>>..."); // dummy first element
for (int i = 0; i < methodNames.length; i++) {
methods.addItem(methodNames[i]);
}
methods.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JComboBox cb = (JComboBox) e.getSource();
methodSelected = (String) cb.getSelectedItem();
if(cb.getSelectedIndex() > 0) {
String data[] = sampler.corbaInvoker().
getInputDataForMethod(
methodSelected);
requestData.setText("");
for (int i = 0; i < data.length; i++) {
requestData.append(data[i] + "\n");
}
modifyTestElement(sampler);
}
}
});
}
}
============================================================================
package org.apache.jmeter.protocol.corba.sampler;
import java.util.Properties;
import java.io.FileInputStream;
import java.util.ArrayList;
import Pmcs.*;
import java.util.Hashtable;
import java.lang.reflect.Method;
import java.util.Enumeration;
import java.io.FileOutputStream;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
import java.lang.reflect.*;
/**
* <p>Title: NGG CRUDre provision interface</p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author Anil Philip
* @version 1.0
*/
public class CorbaInvoker {
private static final Logger log = LoggingManager.getLoggerForClass();
private Properties inputData = null;
Hashtable methodToInvoke = new Hashtable();
public CorbaInvoker() {
}
public Object invoke(String methodName) throws Exception {
MethodTask mt = (MethodTask) methodToInvoke.get(methodName);
Object result = mt.execute();
return result;
}
public void setInputDataFile(String inputDataFileName) {
try {
log.debug("setInputDataFile(). about to load data file: " +
inputDataFileName);
inputData = new Properties();
inputData.load(new FileInputStream(inputDataFileName));
log.debug("setInputDataFile(). loaded data: " +
getInputDataString(inputData));
} catch (java.io.FileNotFoundException fnf) {
log.error(inputDataFileName, fnf);
} catch (Exception ex) {
log.error("", ex);
}
}
/** CorbaInvoker
*
* @param inputDataFileName String
*/
public String[] getMethodNames() {
ArrayList methodNames = new ArrayList();
// keep looking for method.1,method.2,...method.9,... until an
exception is thrown
int i = 0;
String methodName = null;
while (true) {
if ((methodName = inputData.getProperty("method." + i)) == null)
{
break;
} else {
methodNames.add(methodName);
}
i++;
}
return (String[]) methodNames.toArray(new String[] {});
}
/**
* chooseMethodToInvoke
*
* @param methodName String
*/
public MethodTask chooseMethodToInvoke(String methodName) throws
Exception {
MethodTask method = null;
// use Java Reflection to instantiate Task
// Caution: can break here. methodName has to be 'verifyHome' and
the method task defined, VerifyHome
// Also, the method task has to be in this package:
"org.apache.jmeter.protocol.corba.sampler"
// convert 'verifyHome' to 'VerifyHome'
String methodTaskName = methodName.substring(0, 1).toUpperCase() +
methodName.substring(1);
log.debug("about to create " + methodTaskName);
Class classDefinition =
Class.forName("org.apache.jmeter.protocol.corba.sampler." + methodTaskName);
method = (MethodTask) classDefinition.newInstance();
log.debug("created " + method.getClass().getName());
log.debug("chooseMethodToInvoke(). loaded data: " +
getInputDataString(inputData));
if(inputData == null)
throw new Exception("inputData is null");
method.loadInputData(inputData);
methodToInvoke.put(methodName, method);
return (method);
}
/**
* getInputDataForMethod
*
* @param methodName String
*/
public String[] getInputDataForMethod(String methodName) {
Enumeration names = inputData.propertyNames();
ArrayList data = new ArrayList();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
if (name.startsWith(methodName)) {
data.add(name + "=" + inputData.getProperty(name));
}
}
return (String[]) data.toArray(new String[] {});
}
/**
* getInputDataString
*
* @param Properties indat
*/
public String getInputDataString(Properties indat) {
Enumeration names = indat.propertyNames();
StringBuffer data = new StringBuffer();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
data.append(name + "=" + indat.getProperty(name) + " \n");
}
return data.toString();
}
public String[] getNameServiceDetails() {
String[] ns = new String[3];
ns[0] = inputData.getProperty("ServerNameComponent");
ns[1] = inputData.getProperty("ORBInitialHost");
ns[2] = inputData.getProperty("ORBInitialPort");
log.debug("ServerNameComponent:" + ns[0]);
log.debug("ORBInitialHost:" + ns[1]);
log.debug("ORBInitialPort:" + ns[2]);
return ns;
}
}
============================================================================
// $Header:
/home/cvs/jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/con
trol/gui/TCPSamplerGui.java,v 1.5 2004/03/05 01:39:07 sebb Exp $
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.jmeter.protocol.corba.control.gui;
import java.awt.BorderLayout;
import javax.swing.BorderFactory;
import org.apache.jmeter.gui.util.VerticalPanel;
import org.apache.jmeter.protocol.corba.config.gui.CorbaConfigGui;
import org.apache.jmeter.protocol.corba.sampler.CorbaSampler;
import org.apache.jmeter.samplers.gui.AbstractSamplerGui;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.util.JMeterUtils;
/**
* @version $Revision: 1.5 $ $Date: 2004/03/05 01:39:07 $
*/
public class CorbaSamplerGui extends AbstractSamplerGui
{
private CorbaConfigGui CorbaDefaultPanel;
public CorbaSamplerGui()
{
init();
}
public void configure(TestElement element)
{
super.configure(element);
CorbaDefaultPanel.configure(element);
}
public TestElement createTestElement()
{
CorbaSampler sampler = new CorbaSampler();
modifyTestElement(sampler);
return sampler;
}
/**
* Modifies a given TestElement to mirror the data in the gui
components.
* @see
org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
*/
public void modifyTestElement(TestElement sampler)
{
sampler.clear();
((CorbaSampler) sampler).addTestElement(
CorbaDefaultPanel.createTestElement());
this.configureTestElement(sampler);
}
public String getLabelResource()
{
return "corba_sample_title";
}
private void init()
{
setLayout(new BorderLayout(0, 5));
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
VerticalPanel mainPanel = new VerticalPanel();
CorbaDefaultPanel = new CorbaConfigGui(false);
mainPanel.add(CorbaDefaultPanel);
add(mainPanel, BorderLayout.CENTER);
}
}
============================================================================
package org.apache.jmeter.protocol.corba.sampler;
import java.util.*;
import org.omg.CosNaming.*;
import Pmcs.*;
import org.apache.log.Logger;
import org.apache.jorphan.logging.LoggingManager;
/**
* <p>Title: NGG CRUDre provision interface</p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author Anil Philip
* @version 1.0
* This is the Strategy Design Pattern. refer GOF Vlissides "Design
Patterns" book.
* Each idl method will be a class that inherits from this and contains
knowledge and 'hardcoding'
* specific to its method. Reason: We want to avoid Reflection and corba
Dynamic Invocation Interface
* which is hard to debug, yet we want the design to be flexible.
*/
public abstract class MethodTask {
/**
* getInputData
*
* @param inputData Properties
*/
protected String nameServerName = null;
protected String nameServerHost = null;
protected String nameServerPort = null;
private static final Logger log = LoggingManager.getLoggerForClass();
public abstract java.lang.Object execute() throws Exception;
public abstract void loadInputData(Properties inputData) throws Exception;
public void loadConnectionData(Properties inputData) throws Exception {
log.debug("loadConnectionData(). loaded data: " +
getInputDataString(inputData));
if (inputData.getProperty("ORBInitialPort") == null) {
throw new Exception("ORBInitialPort" + " is undefined");
}
nameServerPort = inputData.getProperty("ORBInitialPort");
if (inputData.getProperty("ServerNameComponent") == null) {
throw new Exception("ServerNameComponent" + " is
undefined");
}
nameServerName =
inputData.getProperty("ServerNameComponent");
nameServerHost = inputData.getProperty("ORBInitialHost");
}
public Pmcs.PmcsUserMgt connectToServer() throws Exception {
// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(new String[] {
"-ORBInitialPort", nameServerPort, "-ORBInitialHost",
nameServerHost}, null);
// Obtain the root context.
org.omg.CORBA.Object rootObj = orb.resolve_initial_references(
"NameService");
NamingContextExt root = NamingContextExtHelper.narrow(rootObj);
// Locate through the Naming Service.
NameComponent comp = new NameComponent(nameServerName, "");
org.omg.CORBA.Object mgrObj = root.resolve(new NameComponent[]
{comp});
if (mgrObj == null) {
throw new Exception("Could not connect to " +
nameServerName +
". \nPossible
problem with Name Service or server is down." +
"(mgrObj is null.
root.resolve() " + comp +
"failed");
}
Pmcs.PmcsUserMgt manager = Pmcs.PmcsUserMgtHelper.narrow(mgrObj);
if (manager == null) {
throw new Exception("Could not connect to Pmcs.PmcsUserMgt.
\nPossible problem with Name Service or server is down." +
"(manager is null.
Pmcs.PmcsUserMgtHelper.narrow() failed");
}
return manager;
}
/**
* getInputDataString
*
* @param Properties indat
*/
public String getInputDataString(Properties indat) {
Enumeration names = indat.propertyNames();
StringBuffer data = new StringBuffer();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
data.append(name + "=" + indat.getProperty(name) + " \n");
}
return data.toString();
}
}
============================================================================
package org.apache.jmeter.protocol.corba.sampler;
import java.util.*;
import Pmcs.*;
import org.omg.CORBA.*;
/**
* <p>Title: NGG CRUDre provision interface</p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author Anil Philip
* @version 1.0
* This is one method in Pmcs.idl
*/
public class VerifyHome
extends MethodTask {
Pmcs.PmcsUserMgt manager;
String id = ""; // argument in idl method
public VerifyHome() {
}
/**
*
* @return Object
* @todo Implement this com.openwave.ps.sprintpcs.crudre.pmcs.MethodTask
* method
*/
public java.lang.Object execute() throws Exception {
BooleanHolder isHome = null;
try {
this.manager = connectToServer();
isHome = new org.omg.CORBA.BooleanHolder();
manager.verifyHome(id, isHome);
}
catch (UnsupportedOperationError ex) {
}
return new Boolean((boolean)isHome.value);
}
/**
* loadInputData
*
* @param inputData Properties
* @return String[]
* @todo Implement this com.openwave.ps.sprintpcs.crudre.pmcs.MethodTask
* method
*/
public void loadInputData(Properties inputData) throws Exception {
loadConnectionData(inputData);
id = inputData.getProperty("verifyHome.id");
if(id == null)
throw new Exception("verifyHome.id undefined");
}
}
============================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]