|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AOSapi
RPC-neutral specification of the AOS kernel API version 5. All calls are defined to be thread-safe. The interface is assumed to be used also for proxies in Java AppMWs, so all primitives should allow for IPCException-s to indicate communication problems.
| Nested Class Summary | |
|---|---|
static class |
AOSapi.AcceptResult
Return value of accept(). |
static class |
AOSapi.ConnectResult
Return value of connect(). |
static class |
AOSapi.CreateRoleResult
Return value of createRole(). |
static class |
AOSapi.PrepareWaitACResult
Return value of prepareWaitAgentContainer(). |
static class |
AOSapi.SecSuites
The set of security suites allowed by the spec. |
static class |
AOSapi.WaitACResult
Return value of waitAgentContainer(). |
| Field Summary | |
|---|---|
static java.lang.String |
ACTP_TLS_PROTOCOL_VERSION
Java identifier for the secure protocol used for ACTP |
static java.lang.String |
MUX_TLS_PROTOCOL_VERSION
Java identifier for the secure protocol used for mux base connections |
static java.lang.String |
SCID_AUTH_ALGO
Java security algorithm used for authentication and (TOC) signing. |
static int |
SCID_AUTH_KEYSIZE
Size of keys used for authentication |
static java.lang.String |
SCID_CERT_SIGN_ALGO
Java security algorithm used for certificate signing. |
static java.lang.String |
SCID_DIGEST_ALGO
Java message digest algorithm to use to calculate SCID from public key |
static int |
SCID_DIGEST_ALGO_BITLENGTH
Size of the SCID digest in bits |
static java.lang.String |
SEGMENT_CERT_SUBTYPE
|
static java.lang.String |
SEGMENT_DIGEST_ALGO
Java security algorithm used to compute checksum of segment content. |
static int |
SEGMENT_DIGEST_ALGO_BITLENGTH
Size of the segment digest in bits. |
static java.lang.String |
SEGMENT_SIGN_SUBTYPE
|
static java.lang.String |
SEGMENT_TOC_SUBTYPE
Segment subtypes for special segments |
static java.lang.String |
SIGN_TOC_ALGO
Java security algorithm used to sign a serialised TOC. |
static java.lang.String |
SIGN_TOC_CERTTYPE
Certificate type used in finalized TOC |
static java.lang.String |
XDR_ENCODING_CHARSET
Encoding charset to use to encoded Java strings to XDR |
| Method Summary | |
|---|---|
AOSapi.AcceptResult |
accept(Cookie cookie,
int listenPort,
boolean blocking)
Returns the next permitted connection waiting at a listen endpoint. |
void |
closeConnection(Cookie cookie,
int connectionID)
Closes a connection. |
void |
closeListenEndpoint(Cookie cookie,
int listenPort)
Destroys a listen endpoint and closes any pending connections that have arrived at the listen endpoint. |
AOSapi.ConnectResult |
connect(Cookie cookie,
Endpoint listenEndpoint,
java.lang.String[] secSuites)
Establishes a connection by connecting to a remote listen endpoint. |
int |
createAgentContainer(Cookie cookie)
Creates an empty agent container. |
Endpoint |
createListenEndpoint(Cookie cookie,
int listenPort,
java.lang.String[] secSuites)
Creates a listen endpoint. |
AOSapi.CreateRoleResult |
createRole(Cookie cookie,
RoleBitmap bitmap)
Creates a new role. |
int |
createSegment(Cookie cookie,
int acid,
int segmentType,
byte[] subtype,
byte[] description)
Creates a new empty segment and TOC entry in the given agent container, using the given parameters. |
void |
deleteAgentContainer(Cookie cookie,
int acid)
Deletes an agent container. |
void |
deleteRole(Cookie cookie,
Cookie childCookie)
Deletes an existing role and all kernel resources owned by that role (Agent containers, connection ports, listen ports, other roles etc.) |
void |
deleteSegment(Cookie cookie,
int acid,
int segID)
Removes the given segment from the given agent container. |
void |
finalizeAgentContainer(Cookie cookie,
int acid)
Finalizes an agent container: (a) computes checksums of the container's segments and signs the container using the AOS kernel's private key, and (b) writes the TOC, signature and AOS kernel's key certificate to the agent container's finalization segments. |
int |
getParam(Cookie cookie,
java.lang.String parameterName)
Returns the value of an AOS parameter, a positive integer |
void |
makePersistent(Cookie cookie,
int acid,
int segID)
Marks the given segment of the given agent container as persistent. |
byte[] |
peek(Cookie cookie,
int connectionID,
int max,
boolean blocking)
As receive() but leaves the data that was read in the connection. |
AOSapi.PrepareWaitACResult |
prepareWaitAgentContainer(Cookie cookie,
java.lang.String[] secSuites)
Prepares an incoming agent container shipment. |
byte[] |
readSegment(Cookie cookie,
int acid,
int segID,
int offset,
int length)
Reads a number of bytes from the given segment in the given agent container. |
TOCEntry[] |
readTOC(Cookie cookie,
int acid,
int offset,
int n)
Reads n TOC entries of an agent container, starting at the entry for segment ID 'offset'. |
byte[] |
receive(Cookie cookie,
int connectionID,
int max,
boolean blocking)
Reads available data from a connection up to a specified maximum. |
void |
reenableRole(Cookie cookie)
Used to reset the role so that it can be used again. |
SelectSets |
select(Cookie cookie,
SelectSets sets,
boolean block)
Cf. |
int |
send(Cookie cookie,
int connectionID,
byte[] buffer)
Writes data to a connection. |
void |
shipAgentContainer(Cookie cookie,
int acid,
Endpoint dest,
java.lang.String[] secSuites,
TransactionID tid)
Ships a finalized agent container to a remote AOS kernel. |
AOSapi.WaitACResult |
waitAgentContainer(Cookie cookie,
TransactionID[] tids,
int blockTime)
Waits for completion of an incoming agent container shipment with any of the given transaction ID. |
int |
writeSegment(Cookie cookie,
int acid,
int segID,
int offset,
byte[] frombuf)
Writes a number of bytes to the given segment in the given agent container. |
| Field Detail |
|---|
static final java.lang.String SCID_AUTH_ALGO
static final int SCID_AUTH_KEYSIZE
static final java.lang.String SCID_CERT_SIGN_ALGO
static final java.lang.String SCID_DIGEST_ALGO
static final int SCID_DIGEST_ALGO_BITLENGTH
static final java.lang.String SEGMENT_DIGEST_ALGO
static final int SEGMENT_DIGEST_ALGO_BITLENGTH
static final java.lang.String XDR_ENCODING_CHARSET
static final java.lang.String SEGMENT_TOC_SUBTYPE
static final java.lang.String SEGMENT_CERT_SUBTYPE
static final java.lang.String SEGMENT_SIGN_SUBTYPE
static final java.lang.String SIGN_TOC_ALGO
static final java.lang.String SIGN_TOC_CERTTYPE
static final java.lang.String MUX_TLS_PROTOCOL_VERSION
static final java.lang.String ACTP_TLS_PROTOCOL_VERSION
| Method Detail |
|---|
AOSapi.CreateRoleResult createRole(Cookie cookie,
RoleBitmap bitmap)
throws KernelException
cookie - caller cookiebitmap - the role bitmap for the new role
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
BadArgumentException - if the bitmap is not a strict subset of the caller's role's bitmap
RandomSourceException - if the kernel could not generate a new cookie
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void deleteRole(Cookie cookie,
Cookie childCookie)
throws KernelException
cookie - caller cookie, must correspond to the parent role that
created this rolechildCookie - cookie of the role to be deleted
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownRoleIDException - if the childCookie is unknown.
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
int createAgentContainer(Cookie cookie)
throws KernelException
cookie - caller cookie
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void deleteAgentContainer(Cookie cookie,
int acid)
throws KernelException
cookie - caller cookieacid - agent container to delete
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
int createSegment(Cookie cookie,
int acid,
int segmentType,
byte[] subtype,
byte[] description)
throws KernelException
cookie - caller cookieacid - agent container to create a segment insegmentType - see XDR documentation of TOC_ENTRYsubtype - see XDR documentation of TOC_ENTRYdescription - see XDR documentation of TOC_ENTRY
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
BadArgumentException - if segmentType is invalid (or one of the special segment types), or
subtype or description has the wrong number of bytes
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void deleteSegment(Cookie cookie,
int acid,
int segID)
throws KernelException
cookie - caller cookieacid - agent container to delete segment fromsegID - segment to delete
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
UnknownSegmentIDException - if the segment ID does not exist
PersistentSegmentException - if an attempt is made to delete a persistent segment
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
TOCEntry[] readTOC(Cookie cookie,
int acid,
int offset,
int n)
throws KernelException
cookie - caller cookieacid - agent container to read TOC fromoffset - segment ID of first entry requestedn - the number of entries requested
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
BadArgumentException - if offset or n was invalid
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
byte[] readSegment(Cookie cookie,
int acid,
int segID,
int offset,
int length)
throws KernelException
cookie - caller cookieacid - agent container to read fromsegID - segment to read fromoffset - offset in segment to start reading atlength - number of bytes requested
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
UnknownSegmentIDException - if the segment ID does not exist
BadArgumentException - if the offset or length is invalid
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
int writeSegment(Cookie cookie,
int acid,
int segID,
int offset,
byte[] frombuf)
throws KernelException
cookie - caller cookieacid - agent container to write tosegID - segment to write tooffset - offset in segment to start writing atfrombuf - buffer containing the bytes to write
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
UnknownSegmentIDException - if the segment ID does not exist
SegmentHoleException - if offset is further than one byte beyond the end of the segment
PersistentSegmentException - if an attempt is made to write to a persistent segment
BadArgumentException - if the offset is invalid
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void makePersistent(Cookie cookie,
int acid,
int segID)
throws KernelException
cookie - caller cookieacid - agent container whose segment to make persistentsegID - segment to make persistent
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
UnknownSegmentIDException - if the segment ID does not exist
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void finalizeAgentContainer(Cookie cookie,
int acid)
throws KernelException
cookie - caller cookieacid - agent container to finalize
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void shipAgentContainer(Cookie cookie,
int acid,
Endpoint dest,
java.lang.String[] secSuites,
TransactionID tid)
throws KernelException
cookie - caller cookieacid - agent container to shipdest - the listen endpoint that the remote
kernel uses for incoming agent container
shipments (note: dest.port currently unused)secSuites - a series of cipher suites acceptable to the caller,
null or empty is equivalent to ALL_SEC_SUITES, as ACTP
requires authentication.tid - the transaction ID for this shipment,
created by the remote AOS kernel
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownACIDException - if the agent container ID does not exist
ACNotFinalizedException - if the agent container has not yet been finalized
ConnectionSetupException - if the kernel has insufficient resources to setup a new base connection
AuthenticationException - if the remote kernel could not be authenticated
TargetUnknownException - if the remote AOS kernel did not recognise transactionID or endpoint index
ACTPACTooLargeException - if the AC exceeds the remote kernel's internal limit
ACTPPeerTransientException - if the remote kernel encounters a transient error during ACTP.
ACTPPeerInternalException - if the remote kernel encounters a serious, persistent error during ACTP.
ACTPReceiptException - if the remote AOS kernel did not return a proper receipt for the AC
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
AOSapi.PrepareWaitACResult prepareWaitAgentContainer(Cookie cookie,
java.lang.String[] secSuites)
throws KernelException
cookie - caller cookiesecSuites - a series of cipher suites acceptable to the caller,
null or empty is equivalent to ALL_SEC_SUITES, as ACTP
requires authentication.
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
RandomSourceException - if the kernel could not generate a unique XID
NoKnownSecuritySuiteException - if none of the cipher suites in secSuites are supported by this kernel
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
AOSapi.WaitACResult waitAgentContainer(Cookie cookie,
TransactionID[] tids,
int blockTime)
cookie - caller cookietids - TransactionIDs for the AC shipment. All exceptions
occuring will include the tid of the transaction that met
the error.blockTime - time in seconds in which the kernel will wait for an ACT
to be initiated. blockTime 0 means ``poll''.
Endpoint createListenEndpoint(Cookie cookie,
int listenPort,
java.lang.String[] secSuites)
throws KernelException
cookie - caller cookielistenPort - the listen port number to use, or 0 to let the AOS
kernel pick onesecSuites - a series of cipher suites acceptable to the caller, or
null or empty to leave unspecified. Kernel will then
selected appropriate suites.
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
BadArgumentException - e.g. if an attempt is made to explicitly allocate a listen port
number that is already in use
NoKnownSecuritySuiteException - if a cipher suite in secSuites is not supported by this AOS kernel
InputOutputException - if the kernel encountered persistent communication problems
TransientIOException - if the kernel encountered transient communication problems
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void closeListenEndpoint(Cookie cookie,
int listenPort)
throws KernelException
cookie - caller cookielistenPort - the listen port number
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
InputOutputException - if the kernel encountered persistent communication problems
TransientIOException - if the kernel encountered transient communication problems
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
AOSapi.AcceptResult accept(Cookie cookie,
int listenPort,
boolean blocking)
throws KernelException
cookie - caller cookielistenPort - the listen port numberblocking - whether to allow this method to block
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownEndpointDescrException - if the listenPort is no known
InputOutputException - if the kernel encountered persistent communication problems
TransientIOException - if the kernel encountered transient communication problems
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
AOSapi.ConnectResult connect(Cookie cookie,
Endpoint listenEndpoint,
java.lang.String[] secSuites)
throws KernelException
cookie - caller cookielistenEndpoint - the address of the remote listen endpointsecSuites - a series of cipher suites acceptable to the
caller, or null or empty to leave unspecified
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
NoKnownSecuritySuiteException - if none of the cipher suites in secSuites are supported by this kernel
ConnectionSetupException - if the kernel has insufficient resources to setup a new base connection
PeerUnreachableException - if the peer could not be physically reached over the network
SecuritySuiteAgreementException - if the local AOS kernel and the remote AOS kernel were unable to
negotiate security parameters required for establishing the connection
AuthenticationException - if the remote kernel could not be authenticated
TargetUnknownException - if the remote AOS kernel did not recognise the endpoint index
InputOutputException - if the kernel encountered persistent communication problems
TransientIOException - if the kernel encountered transient communication problems
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void closeConnection(Cookie cookie,
int connectionID)
throws KernelException
cookie - caller cookieconnectionID - the connection to close
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownConnectionIDException - if the connection ID is unknown
InputOutputException - if the kernel encountered persistent communication problems
TransientIOException - if the kernel encountered transient communication problems
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
int send(Cookie cookie,
int connectionID,
byte[] buffer)
throws KernelException
cookie - caller cookieconnectionID - the connection to write tobuffer - the buffer that holds the data
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownConnectionIDException - if the connection ID is unknown
TargetUnknownException - if the connection was closed because the peer's role was deleted
PeerClosedConnectionException - if the peer gracefully closed the connection
InputOutputException - if the kernel encountered persistent communication problems
TransientIOException - if the kernel encountered transient communication problems
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
byte[] receive(Cookie cookie,
int connectionID,
int max,
boolean blocking)
throws KernelException
cookie - caller cookieconnectionID - the connection to readmax - maximum number of bytes to readblocking - whether to allow this method to block
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
AccessDeniedException - if the caller does not own the kernel resource.
UnknownConnectionIDException - if the connection ID is unknown
BadArgumentException - if 'max' is zero
PeerClosedConnectionException - if the peer gracefully closed the connection
InputOutputException - if the kernel encountered persistent communication problems
TransientIOException - if the kernel encountered transient communication problems
LimitExceededException - if the caller exceeded an AOS resource limit
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
byte[] peek(Cookie cookie,
int connectionID,
int max,
boolean blocking)
throws KernelException
KernelException
SelectSets select(Cookie cookie,
SelectSets sets,
boolean block)
throws KernelException
cookie - caller cookiesets - set of three sets: readSet, writeSet, exceptSet
readSet : set of local descriptors to check for data/connection
availability
writeSet set of local descriptors to check for writability
exceptSet set of local descriptors to check for exceptionsblock - whether to block or not
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
int getParam(Cookie cookie,
java.lang.String parameterName)
throws KernelException
cookie - caller cookieparameterName - the name of the AOS parameter
UnknownRoleException - if the caller is unknown
MethodNotAllowedException - if the caller is not allowed to invoke the primitive
KernelResetException - if the kernel has been restarted
IPCException - if the operation failed due to an IPC error
KernelException
void reenableRole(Cookie cookie)
throws KernelException
cookie - caller cookie
UnknownRoleException - if the caller is unknown
IPCException - if the operation failed due to an IPC error
KernelException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||