Edward Kawas > MOBY-Client-1.06 > MOBY::Async::SimpleServer

Download:
MOBY-Client-1.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.05   Source  

NAME ^

MOBY::Async::SimpleServer - a base class for simple Asynchronous MOBY Services

AUTHORS ^

Former developer Enrique de Andres Saiz (enrique.deandres@pcm.uam.es) - INB GNHC-1 (Madrid Science Park, Spain) (2006-2007).

Maintainers Jose Maria Fernandez (jmfernandez@cnio.es), Jose Manuel Rodriguez (jmrodriguez@cnio.es) - INB GN2 (CNIO, Spain).

DESCRIPTION ^

Provides a simple class that can be extended to build file based asynchronous services. When submission, these services will just fork the a process, returning inmediately and leaving running the service in background. They store the state information in a file.

This class provides the WS-ResourceProperty and WS-ResourceLifetime methods required for Asynchronous MOBY Services:

WS-ResourceProperty:
 GetResourceProperty
 GetMultipleResourceProperties
WS-ResourceLifetime:
 Destroy

Additionally, this class provides other methods in order to carry up synchronous or asynchronous request of the service.

METHODS ^

sync

 Name       :    sync
 Function   :    answers synchronous requests of asynchronous BioMOBY
                 services; it tries to execute the service; if execution
                 time exceeds a defined timeout, it returns a moby exception
                 suggesting to invoke the service asynchronously.
 Usage      :    sub servicename {
                   my $self = shift @_;
                   return $self->sync($func, $timeout, @_);
                 }
 Args       :    $func    - the subroutine which carries out the service.
                 $timeout - the allowed timeout in seconds.
                 @_       - the parameters received from the client.
 Returns    :    a SOAP response containing a MOBY message.

error

 Name       :    error
 Function   :    answers synchronous requests of asynchronous BioMOBY
                 services; it just returns a moby exception indicating
                 that the service must be invoked asynchronously.
 Usage      :    sub servicename {
                   my $self = shift @_;
                   return $self->error(@_);
                 }
 Args       :    @_ - the parameters received from the client.
 Returns    :    a SOAP response containing a MOBY message.

async

 Name       :    async
 Function   :    answers asynchronous requests of asynchronous BioMOBY
                 services.
 Usage      :    sub servicename_submit {
                   my $self = shift @_;
                   return $self->async($func, @_);
                 }
 Args       :    $func - the subroutine which carries out the service.
                 @_    - the parameters received from the client.
 Returns    :    a SOAP response containing an EPR.
syntax highlighting: