[SAGA-RG] saga-ogf SVN commit 1283: /trunk/documents/saga-core-binding-java/implementation/VU/src/org/ogf/saga/stream/

ceriel at cs.vu.nl ceriel at cs.vu.nl
Thu Aug 26 10:36:02 CDT 2010


User: svn_ceriel
Date: 2010/08/26 10:36 AM

Modified:
 /trunk/documents/saga-core-binding-java/implementation/VU/src/org/ogf/saga/stream/
  Stream.java, StreamServer.java

Log:
 Updated stream/streamserver specification as specified in Sagaspec 1.1: added connect() to streamserver, added timeout to stream connect().

File Changes:

Directory: /trunk/documents/saga-core-binding-java/implementation/VU/src/org/ogf/saga/stream/
=============================================================================================

File [modified]: Stream.java
Delta lines: +52 -0
===================================================================
--- trunk/documents/saga-core-binding-java/implementation/VU/src/org/ogf/saga/stream/Stream.java	2010-07-14 09:15:03 UTC (rev 1282)
+++ trunk/documents/saga-core-binding-java/implementation/VU/src/org/ogf/saga/stream/Stream.java	2010-08-26 15:35:55 UTC (rev 1283)
@@ -193,6 +193,42 @@
             TimeoutException, NoSuccessException;
 
     /**
+     * Establishes a connection to the target defined during the construction of
+     * the stream.
+     * @param timeoutInSeconds
+     *      the timeout in seconds.
+     * @exception NotImplementedException
+     *      is thrown if the implementation does not provide an
+     *      implementation of this method.
+     * @exception PermissionDeniedException
+     *      is thrown when the method failed because the identity used did
+     *      not have sufficient permissions to perform the operation
+     *      successfully.
+     * @exception AuthorizationFailedException
+     *      is thrown when none of the available contexts of the
+     *      used session could be used for successful authorization.
+     *      This error indicates that the resource could not be accessed
+     *      at all, and not that an operation was not available due to
+     *      restricted permissions.
+     * @exception AuthenticationFailedException
+     *      is thrown when operation failed because none of the available
+     *      session contexts could successfully be used for authentication.
+     * @exception TimeoutException
+     *      is thrown when a remote operation did not complete successfully
+     *      because the network communication or the remote service timed
+     *      out.
+     * @exception IncorrectStateException
+     *      is thrown when the stream is already closed.
+     * @exception NoSuccessException
+     *      is thrown when the operation was not successfully performed,
+     *      and none of the other exceptions apply.
+     */
+    public void connect(float timeoutInSeconds) throws NotImplementedException,
+            AuthenticationFailedException, AuthorizationFailedException,
+            PermissionDeniedException, IncorrectStateException,
+            TimeoutException, NoSuccessException;
+
+    /**
      * Checks if the stream is ready for I/O, or if it has entered the ERROR
      * state. It will only check for the specified activities. This method
      * blocks until one or more of the specified activities apply.
@@ -623,6 +659,22 @@
             throws NotImplementedException;
 
     /**
+     * Returns a task that establishes a connection to the target defined during
+     * the construction of the stream.
+     * 
+     * @param mode
+     *            the task mode.
+     * @param timeoutInSeconds
+     *            the timeout in seconds.
+     * @return the task.
+     * @exception NotImplementedException
+     *                is thrown when the task version of this method is not
+     *                implemented.
+     */
+    public Task<Stream, Void> connect(TaskMode mode, float timeoutInSeconds)
+            throws NotImplementedException;
+
+    /**
      * Returns a task that checks if the stream is ready for I/O, or if it has
      * entered the ERROR state. It will only check for the specified activities.
      * 

File [modified]: StreamServer.java
Delta lines: +102 -2
===================================================================
--- trunk/documents/saga-core-binding-java/implementation/VU/src/org/ogf/saga/stream/StreamServer.java	2010-07-14 09:15:03 UTC (rev 1282)
+++ trunk/documents/saga-core-binding-java/implementation/VU/src/org/ogf/saga/stream/StreamServer.java	2010-08-26 15:35:55 UTC (rev 1283)
@@ -16,8 +16,8 @@
 import org.ogf.saga.url.URL;
 
 /**
- * A <code>StreamServer</code> object establishes a listening/server object
- * that waits for client connections. It is similar to a serversocket.
+ * A <code>StreamServer</code> object represents an endpoint for
+ * a listening/server object that waits for client connections.
  */
 public interface StreamServer extends SagaObject, Async,
         AsyncMonitorable<StreamServer>, Permissions<StreamServer> {
@@ -103,6 +103,78 @@
             TimeoutException, NoSuccessException;
 
     /**
+     * Establishes a connection to the stream server.
+     * @return
+     *      the resulting stream.
+     * @exception NotImplementedException
+     *      is thrown if the implementation does not provide an
+     *      implementation of this method.
+     * @exception PermissionDeniedException
+     *      is thrown when the method failed because the identity used did
+     *      not have sufficient permissions to perform the operation
+     *      successfully.
+     * @exception AuthorizationFailedException
+     *      is thrown when none of the available contexts of the
+     *      used session could be used for successful authorization.
+     *      This error indicates that the resource could not be accessed
+     *      at all, and not that an operation was not available due to
+     *      restricted permissions.
+     * @exception AuthenticationFailedException
+     *      is thrown when operation failed because none of the available
+     *      session contexts could successfully be used for authentication.
+     * @exception TimeoutException
+     *      is thrown when a remote operation did not complete successfully
+     *      because the network communication or the remote service timed
+     *      out.
+     * @exception IncorrectStateException
+     *      is thrown when the stream is already closed.
+     * @exception NoSuccessException
+     *      is thrown when the operation was not successfully performed,
+     *      and none of the other exceptions apply.
+     */
+    public Stream connect() throws NotImplementedException,
+            AuthenticationFailedException, AuthorizationFailedException,
+            PermissionDeniedException, IncorrectStateException,
+            TimeoutException, NoSuccessException;
+
+    /**
+     * Establishes a connection to the stream server.
+     * @param timeoutInSeconds
+     *      the timeout in seconds.
+     * @return
+     *      the resulting stream.
+     * @exception NotImplementedException
+     *      is thrown if the implementation does not provide an
+     *      implementation of this method.
+     * @exception PermissionDeniedException
+     *      is thrown when the method failed because the identity used did
+     *      not have sufficient permissions to perform the operation
+     *      successfully.
+     * @exception AuthorizationFailedException
+     *      is thrown when none of the available contexts of the
+     *      used session could be used for successful authorization.
+     *      This error indicates that the resource could not be accessed
+     *      at all, and not that an operation was not available due to
+     *      restricted permissions.
+     * @exception AuthenticationFailedException
+     *      is thrown when operation failed because none of the available
+     *      session contexts could successfully be used for authentication.
+     * @exception TimeoutException
+     *      is thrown when a remote operation did not complete successfully
+     *      because the network communication or the remote service timed
+     *      out.
+     * @exception IncorrectStateException
+     *      is thrown when the stream is already closed.
+     * @exception NoSuccessException
+     *      is thrown when the operation was not successfully performed,
+     *      and none of the other exceptions apply.
+     */
+    public Stream connect(float timeoutInSeconds) throws NotImplementedException,
+            AuthenticationFailedException, AuthorizationFailedException,
+            PermissionDeniedException, IncorrectStateException,
+            TimeoutException, NoSuccessException;
+
+    /**
      * Waits for incoming client connections (like an accept of a serversocket).
      * The returned stream is in OPEN state.
      * 
@@ -216,6 +288,34 @@
             float timeoutInSeconds) throws NotImplementedException;
 
     /**
+     * Returns a task that establishes a connection to the stream server.
+     * 
+     * @param mode
+     *            the task mode.
+     * @return the task.
+     * @exception NotImplementedException
+     *                is thrown when the task version of this method is not
+     *                implemented.
+     */
+    public Task<StreamServer, Stream> connect(TaskMode mode)
+            throws NotImplementedException;
+
+    /**
+     * Returns a task that establishes a connection to the stream server.
+     * 
+     * @param mode
+     *            the task mode.
+     * @param timeoutInSeconds
+     *            the timeout in seconds.
+     * @return the task.
+     * @exception NotImplementedException
+     *                is thrown when the task version of this method is not
+     *                implemented.
+     */
+    public Task<StreamServer, Stream> connect(TaskMode mode, float timeoutInSeconds)
+            throws NotImplementedException;
+
+    /**
      * Obtains a task that closes a stream server.
      * 
      * @param mode



More information about the saga-rg mailing list