net.ponder2
Class PonderTalk

java.lang.Object
  extended by net.ponder2.PonderTalk
All Implemented Interfaces:
ManagedObject

public class PonderTalk
extends java.lang.Object
implements ManagedObject

A Managed Object that parses and executes PonderTalk. PonderTalk can be supplied as strings from other PonderTalk statements or as strings received over RMI. The PonderTalk string is executed and the result is returned as a string. If an error occurs then a Ponder2Exception or a RemoteException is thrown. This managed object can also be used as a stand-alone program to send PonderTalk to a remote SMC using RMI.
1. Create this managed object in an SMC giving it a RMI name to use. e.g. MyPonder2
2. Send PonderTalk to the SMC using the Ponder2 JAR file e.g.
java -cp ponder2.jar net.ponder2.PonderTalk MyPonder2 any PonderTalk statement

Version:
$Id:$
Author:
Kevin Twidle

Constructor Summary
PonderTalk(P2Object myP2Object)
          Creates a PonderTalk managed object
 
Method Summary
 P2Object executePonderTalk(java.lang.String aPonderTalkString)
          Compiles and executes aPonderTalkString and returns the result.
static void main(java.lang.String[] args)
           
 java.lang.String test(java.lang.String aString)
          tests the RMI interface without having to run a separate SMC
 void trace(boolean aBoolean)
          turns tracing on if aBoolean is true else turns it off.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PonderTalk

public PonderTalk(P2Object myP2Object)
Creates a PonderTalk managed object

Parameters:
myP2Object -
Throws:
Ponder2ArgumentException
Method Detail

trace

public void trace(boolean aBoolean)
turns tracing on if aBoolean is true else turns it off.

Parameters:
aBoolean -

test

public java.lang.String test(java.lang.String aString)
                      throws Ponder2OperationException
tests the RMI interface without having to run a separate SMC

Parameters:
aString - the PonderTalk to be executed
Returns:
the result of the execution as a String
Throws:
Ponder2OperationException

executePonderTalk

public P2Object executePonderTalk(java.lang.String aPonderTalkString)
                           throws Ponder2OperationException
Compiles and executes aPonderTalkString and returns the result.

Parameters:
aPonderTalkString - the PonderTalk to be executed
Returns:
the object that results from the PonderTalk being executed
Throws:
Ponder2OperationException

main

public static void main(java.lang.String[] args)


Copyright © 2008 Imperial College. All Rights Reserved.