|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.mit.csail.aeolus.api.AeolusLib
public final class AeolusLib
This class contains utilities for accessing and manipulating the labels of the current thread; it also provides launch, shutdown, registerService, getService, fork, call, getRoot and setRoot.
Method Summary | ||
---|---|---|
static void |
addSecrecy(AeolusTag t)
Adds AeolusTag to the caller's secrecy label |
|
static void |
addSecrecy(java.util.List<AeolusTag> tags)
Adds each AeolusTag in tags to the caller's secrecy label |
|
static
|
call(java.util.concurrent.Callable<T> codeObj,
PID calleePid)
Invokes codeObj in the same user thread with the authority of calleePid. |
|
static void |
createBlock()
Creates a new block for the storage of pids, tags, and labels |
|
static EventID |
createEvent(java.lang.String desc,
java.util.List<java.lang.String> appArgs)
Creates a new event in the Aeolus audit trails. |
|
static EventID |
createEvent(java.lang.String desc,
java.util.List<java.lang.String> appArgs,
java.util.List<EventID> elist)
Creates a new event in the Aeolus audit trails. |
|
static void |
declassify(AeolusTag t)
Remove AeolusTag from the caller's secrecy label |
|
static void |
declassify(java.util.List<AeolusTag> tags)
Remove AeolusTags from the caller's secrecy label |
|
static void |
endorse(AeolusTag t)
Add AeolusTag to the caller's integrity label |
|
static void |
endorse(java.util.List<AeolusTag> tags)
Add AeolusTags in List to the caller's integrity label |
|
static void |
fork(java.lang.Runnable codeObj)
Runs code in a different user thread. |
|
static void |
fork(java.lang.Runnable codeObj,
PID calleePid)
Runs code in a different user thread. |
|
static java.util.List<java.lang.Integer> |
getBasis()
Returns caller's basis |
|
static EventID |
getEventID()
Returns the EventID of the most recent event logged for the thread. |
|
static AeolusLabel |
getIntegrity()
Returns caller's integrity label |
|
static PID |
getPID()
Returns caller's PID |
|
static AeolusShared |
getRoot()
Returns the shared state root. |
|
static AeolusLabel |
getSecrecy()
Returns caller's secrecy label |
|
static java.lang.Object |
getService(java.lang.String remoteHostName,
java.lang.String serviceName,
java.lang.Class<?> serviceClass)
Return service stub that implements the interface specified by serviceName. |
|
static void |
launch(java.lang.String hostname,
PID pid,
java.lang.String appName,
java.lang.String appParams)
Launches a new platform instance on the specified Aeolus node with the specified authority. |
|
static void |
makeCurrentBlock(PID p)
Makes the block that contains p the current block for the storage of pids, tags, and labels |
|
static void |
registerService(java.lang.String serviceName,
java.lang.Class<?> service)
Registers a service with Aeolus, which allows it to be accessed remotely. |
|
static void |
removeIntegrity(AeolusTag t)
Removes AeolusTag from the caller's integrity label |
|
static void |
removeIntegrity(java.util.List<AeolusTag> tags)
Removes AeolusTags from the caller's integrity label |
|
static void |
setRoot(AeolusShared root)
Set the shared state root. |
|
static void |
shutdown()
Shuts down the virtual node of the caller |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void addSecrecy(AeolusTag t) throws AeolusException
t
- - AeolusTag to add to the secrecy label
AeolusException
- - if an attempt to change a label occurs
while the thread is running inside a shared objectpublic static void addSecrecy(java.util.List<AeolusTag> tags) throws AeolusException
tags
- - List of AeolusTags to add to the secrecy label
AeolusException
- - if an attempt to change a label occurs
while the thread is running inside a shared objectpublic static <T> T call(java.util.concurrent.Callable<T> codeObj, PID calleePid) throws AuthorityException, java.lang.Exception
codeObj
- - code to invokecalleePid
- - principal to run the code on behalf of
AuthorityException
- - if caller principal cannot switch to calleePid
java.lang.Exception
- - if an exception is thrown by the invoke method of the codeObjpublic static void createBlock() throws InfoFlowControlException
InfoFlowControlException
- if the thread's secrecy label is not nullpublic static EventID createEvent(java.lang.String desc, java.util.List<java.lang.String> appArgs) throws AeolusException
desc
- - a String describing the eventappArgs
- - a list of Strings for this event chosen by the application
AeolusException
public static EventID createEvent(java.lang.String desc, java.util.List<java.lang.String> appArgs, java.util.List<EventID> elist) throws AeolusException
desc
- - a String describing the eventappArgs
- - a list of Strings for this event chosen by the applicationelist
- - a list of predecessors for this event
AeolusException
public static void declassify(AeolusTag t) throws AeolusException
t
- - AeolusTag to remove from the secrecy label
AuthorityException
- - if caller principal does not have
authority for t
AeolusException
- - if an attempt to change a label occurs
while the thread is running inside a shared objectpublic static void declassify(java.util.List<AeolusTag> tags) throws AuthorityException, AeolusException
tags
- - List of AeolusTags to remove from the secrecy label
AuthorityException
- - if caller principal does not have
authority for each tag in tags
AeolusException
- - if an attempt to change a label occurs
while the thread is running inside a shared objectpublic static void endorse(AeolusTag t) throws AuthorityException, AeolusException
t
- - AeolusTag to add to the integrity label
AuthorityException
- - if caller principal does not have authority for t
AeolusException
- - if caller is inside a shared state objectpublic static void endorse(java.util.List<AeolusTag> tags) throws AuthorityException, AeolusException
tags
- - List of AeolusTags to add to the integrity label
AuthorityException
- - if caller principal does not have authority for each AeolusTag
AeolusException
- - if caller is inside a shared state objectpublic static void fork(java.lang.Runnable codeObj) throws AeolusException
codeObj
- - code to invoke
AuthorityException
- - if thread can not switch to pid
AeolusException
- - if caller running in shared statepublic static void fork(java.lang.Runnable codeObj, PID calleePid) throws AuthorityException, AeolusException
codeObj
- - code to invokecalleePid
- - principal to run the new user thread with
AuthorityException
- - if caller principal cannot switch to calleePid
AeolusException
- - if a platform failure occurs when starting the new user threadpublic static java.util.List<java.lang.Integer> getBasis()
public static EventID getEventID() throws AeolusException
AeolusException
- - if logging is not enabled.public static AeolusLabel getIntegrity()
public static PID getPID()
public static AeolusShared getRoot()
public static AeolusLabel getSecrecy()
public static java.lang.Object getService(java.lang.String remoteHostName, java.lang.String serviceName, java.lang.Class<?> serviceClass)
Foo service = (Foo) getService("localhost", "path.to.Foo", serviceClass);
Serializable z = service.methodA(x, y);
A method invocation on the service stub will result in a remote procedure call to the remote host.
remoteHostName
- - node where the desired remote service was registeredserviceName
- - name that the service is bound to on the remote hostserviceClass
- - local Class which defines the interface of the service
java.lang.NullPointerException
- - if serviceClass is null or any of its elements are null
java.lang.IllegalArgumentException
- - if any of the restrictions on the getProxyClass method
in Java's Proxy class are violated.public static void launch(java.lang.String hostname, PID pid, java.lang.String appName, java.lang.String appParams) throws InfoFlowControlException, AuthorityException, AeolusException, RpcException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
This instance starts executing the application of the given name. Caller's secrecy label must be null to execute this request. Caller principal must act for the specified pid.
hostname
- - node where the platform instance should be launchedpid
- - principal to launch the platform instance on behalf ofappName
- - application to start running in the new platform instanceappParams
- - parameters to the application
InfoFlowControlException
- - if caller's secrecy label is not null
AuthorityException
- - if caller does not act for pid
RpcException
- - if failure in communicating with hostname
java.lang.ClassNotFoundException
- - if application class was not found on hostname
java.lang.NoSuchMethodException
- - if main method was not found in the application
java.lang.reflect.InvocationTargetException
- - if an exception was thrown by the main method (declared or runtime exception),
this exception is a wrapper; use e.getCause() to view the actual thrown exception
AeolusException
- - if any other failure while launching the application or
if an unexpected platform failure occurredpublic static void makeCurrentBlock(PID p) throws InfoFlowControlException, AuthorityException
InfoFlowControlException
- if the thread's secrecy label is not null
AuthorityException
- if the thread does not act-for ppublic static void registerService(java.lang.String serviceName, java.lang.Class<?> service) throws InfoFlowControlException, java.lang.NullPointerException
serviceName
- - name of the interface implemented by the serviceservice
- - class implementing the service (must implement the service interface)
InfoFlowControlException
- - if caller's secrecy label is not null
java.lang.NullPointerException
- - if service is nullpublic static void removeIntegrity(AeolusTag t) throws AeolusException
t
- - AeolusTag to remove from integrity label
AeolusException
- - if an attempt to change a label occurs
while the thread is running inside a shared objectpublic static void removeIntegrity(java.util.List<AeolusTag> tags) throws AuthorityException, AeolusException
tags
- - List of AeolusTag to remove from integrity label
AuthorityException
- - if an attempt to use authority occurs while in shared state
AeolusException
- - if caller is inside a shared state objectpublic static void setRoot(AeolusShared root) throws InfoFlowControlException
InfoFlowControlException
- - if caller's secrecy label isn't nullpublic static void shutdown() throws InfoFlowControlException
Any threads running in the virtual node (VN) will be terminated immediately. The VN's service will be deregistered and the VN will be shutdown. Caller's secrecy label must be null to execute this request.
InfoFlowControlException
- - if caller's seclabels are not null
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |