Edward Kawas > SADI-1.10 > SADI::ServiceBase

Download:
SADI-1.10.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

SADI::ServiceBase - a super-class for all SADI services

SYNOPSIS ^

 use base qw( SADI::ServiceBase )

DESCRIPTION ^

A super class for all SADI services implemented with SADISeS.

SUBROUTINES ^

process_it

A job-level processing: This is the main method to be overriden by a service provider!. Here all the business logic belongs to.

This method is called once for each service invocation request.

Note that here, in SADI::Service::ServiceBase, this method does nothing. Which means it leaves the output job empty, as it was given here. Consequence is that if you do not override this method in a sub-class, the client will get back an empty request. Which may be good just for testing but not really what a client expects (I guess).

You are free to throw an exception (TBD: example here). However, if you do so the complete processing of the whole client request is considered failed. After such exception the client will not get any data back (only an error message).

as_uni_string

Convert given $value (the only argument) into Unicode and wrap it as a SADI string (type SADI::Data::String).

log_request

 # should be called when a request from a client comes; it returns
 # information about the current call (request) that can be used in a
 # log entry

get_request_content_type

 # Returns the content type of the incoming data, defaults to application/rdf+xml.
 #
 # Possible values: 'application/rdf+xml', 'text/rdf+n3'

get_response_content_type

 # Returns the requested content type of the outgoing data, defaults to application/rdf+xml.
 #
 # Possible values: 'application/rdf+xml', 'text/rdf+n3'

AUTHORS, COPYRIGHT, DISCLAIMER ^

 Edward Kawas  (edward.kawas [at] gmail [dot] com)
 Martin Senger (martin.senger [at] gmail [dot] com)

Copyright (c) 2009 Edward Kawas. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This software is provided "as is" without warranty of any kind.

syntax highlighting: