|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ponder2.Domain
net.ponder2.SelfManagedCell
public class SelfManagedCell
The top level root domain of the whole system. Contains main() to start the whole thing off
Field Summary | |
---|---|
static java.lang.String |
EventDomain
|
static java.lang.String |
PolicyDomain
|
static int |
port
|
static P2Object |
RootDomain
|
static java.util.Map<java.lang.String,P2Object> |
startupArgs
|
static java.lang.String[] |
startupArgsArray
|
static java.lang.String |
SVNDate
|
static java.lang.String |
SVNRevision
|
static boolean |
SystemTrace
|
Constructor Summary | |
---|---|
SelfManagedCell(P2Object myP2Object)
creates a new SelfManagedCell domain. |
Method Summary | |
---|---|
protected void |
address(java.lang.String anAddress)
Loads a communications protocol and sets the SMC's local address to anAddress. |
protected P2Object |
argsAsArray()
answers with an array containing all the user supplied arguments to the SMC. |
protected P2Object |
argsAsHash()
answers with a hash containing the user supplied arguments to the SMC. |
protected P2Object |
execute(P2Object source,
P2Block aBlock)
Executes aBlock with no arguments. |
protected P2Object |
executeArgs(P2Object source,
P2Block aBlock,
P2Array anArray)
Executes aBlock with anArray of arguments. |
protected P2Object |
executeHash(P2Object source,
P2Block aBlock,
P2Hash aHash)
Executes aBlock with the values of its arguments being taken by name from aHash. |
protected void |
exit()
Terminates the Ponder2 SMC with a zero status |
protected void |
exit(int exitStatus)
Terminates the Ponder2 SMC with exitStatus |
static boolean |
getDefaulAuthPolicy()
|
java.lang.String |
getFile(java.lang.String aFileName)
Reads a text file called aFileName into a string and returns it. |
static void |
main(java.lang.String[] args)
starts the whole system running |
protected long |
memory()
answers with the amount of free memory in the Java VM |
protected P2Object |
operation_import_from(java.lang.String aName,
java.lang.String aLocation)
Answers the remote managed object which has aName belonging to an SMC at aLocation. |
protected P2Object |
operation_load(java.lang.String anObject)
Loads the code necessary for creating an instance of anObject. |
static boolean |
ping(java.lang.String location)
Pings remote SMC to see if it is alive. |
protected java.lang.String |
print(java.lang.String aString)
Answers aString. |
void |
read(P2Object source,
java.lang.String aUrl)
Reads and executes PonderTalk from aUrl. |
void |
read(P2Object source,
java.lang.String aUrl,
P2Hash varHash)
Reads and executes PonderTalk from aUrl. |
P2Object |
readString(P2Object source,
java.lang.String aPonderTalkString)
Reads and executes PonderTalk from aPonderTalkString. |
P2Object |
readString(P2Object source,
java.lang.String aPonderTalkString,
P2Hash varHash)
Reads and executes PonderTalk from aPonderTalkString. |
protected void |
sleep(int secs)
Sleeps for secs seconds |
static void |
start(java.lang.String[] args)
starts the whole system running and returns the root OID. |
protected boolean |
trace(boolean aBoolean)
Answers aBoolean. |
Methods inherited from class net.ponder2.Domain |
---|
add, contains, contains, get, names, operation_asHash, operation_at_add, operation_at, operation_at, operation_collect, operation_do, operation_listNames, operation_listObjects, operation_remove, operation_resolve, remove, removeAll, removeObject, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SVNDate
public static final java.lang.String SVNRevision
public static boolean SystemTrace
public static final java.lang.String EventDomain
public static final java.lang.String PolicyDomain
public static P2Object RootDomain
public static int port
public static java.util.Map<java.lang.String,P2Object> startupArgs
public static java.lang.String[] startupArgsArray
Constructor Detail |
---|
public SelfManagedCell(P2Object myP2Object)
Method Detail |
---|
protected P2Object argsAsHash()
The arguments are interpreted as key=>value pairs where the key is an argument starting with a '-'. A value cannot start with a '-', it is taken to be the next key instead. The hash is indexed with the names of the keys without the '-'. If a value follows a key then it is included as the value in the hash. If a value is found without a preceding key, it is ignored. In the following example "copper" will be lost.
-a -b gold -c silver copper -d
becomes
a => "" b => gold c => silver d => ""
protected P2Object argsAsArray()
protected void sleep(int secs)
secs
- protected void exit()
protected void exit(int exitStatus)
exitStatus
- protected void address(java.lang.String anAddress) throws Ponder2RemoteException
anAddress
- the new address as a string in the correct format for the protocol
chosen
Ponder2RemoteException
- if the protocol cannot be loaded properlyprotected P2Object operation_load(java.lang.String anObject) throws Ponder2Exception
Ponder2Exception
public static boolean ping(java.lang.String location) throws Ponder2Exception
location
- address of remote site
Ponder2Exception
protected P2Object operation_import_from(java.lang.String aName, java.lang.String aLocation) throws Ponder2Exception
Ponder2Exception
protected long memory()
public void read(P2Object source, java.lang.String aUrl) throws Ponder2Exception
source
- aUrl
-
Ponder2Exception
public void read(P2Object source, java.lang.String aUrl, P2Hash varHash) throws Ponder2Exception
source
- aUrl
-
Ponder2Exception
public P2Object readString(P2Object source, java.lang.String aPonderTalkString) throws Ponder2Exception
Ponder2Exception
public P2Object readString(P2Object source, java.lang.String aPonderTalkString, P2Hash varHash) throws Ponder2Exception
Ponder2Exception
public java.lang.String getFile(java.lang.String aFileName) throws Ponder2OperationException
aFileName
-
Ponder2OperationException
protected boolean trace(boolean aBoolean)
protected java.lang.String print(java.lang.String aString)
protected P2Object execute(P2Object source, P2Block aBlock) throws Ponder2Exception
Ponder2Exception
protected P2Object executeHash(P2Object source, P2Block aBlock, P2Hash aHash) throws Ponder2Exception
Ponder2Exception
protected P2Object executeArgs(P2Object source, P2Block aBlock, P2Array anArray) throws Ponder2Exception
Ponder2Exception
public static boolean getDefaulAuthPolicy()
public static void start(java.lang.String[] args)
args
- see doc for argument values and meaningspublic static void main(java.lang.String[] args)
args
- see doc for argument values and meanings
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |