mn8 Language Reference | Index    

BEEPClient

SUMMARY: NO ATTRIBUTES  NO ELEMENTS  CONSTRUCTORS SUMMARY  NO OPERATORS  METHODS SUMMARYDETAIL: NO ATTRIBUTES  NO ELEMENTS  CONSTRUCTOR DETAILS  NO OPERATORS  METHOD DETAILS

Description

This concept can be used to execute SEP commands on specified BEEP server.
The URL format is "beep://user:password@host:port/DBName".

Usage

First create a BEEP connection

            $beep = BEEPClient.create( URL )
where URL is something like this: where DB is the DataStore database name To execute a SEP command:
            $beep.execute( SEPcommand )
where SEPCommand like this:
<request reqno='1'><fetch><union><intersect><compare subtree='xmlrpctest/1'><path/><value></value></compare></intersect></union></fetch></request>
it returns a String concept.

You can use a secure connection if you have a JSSE TLS package. For secure connection append to the end of your url "security=jsse" query the url will show like this:

For this connection you need to have the following jar packages:

Do not forgot to set the security provider into your java.security file.
You can find this file:

To set the JSSE security provider add the following line into this file:

where the character 'n' is the next provider number, you may have already in this file a provider with the number one in this case the next provider (with number two) will be the JSSE provider:

Version: 0.1
Authors:Szabo Csaba ()
Location:
Inherits: Concept

Constructor List

create (String $url)
top

Method List

Stringexecute (String $command)
top
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getErrorHandler, getInheritedConcepts, getResourceURI, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML, setResourceURI

Detailed Constructor Info

create (String $url)
Parameters:
$url : The URL to the BEEP server. (ex. beep://user:password@host:port/DBname)
Exceptions:
badURLException :
(Error)
If the URL to the BEEP server isn't valid.
connectionException :
(Error)
If unable to connect to specified XML database.
unsupportedProtocolException :
(Error)
If the URL protocol isn't beep.

Constructs a new BEEPClient to the specified BEEP server.

top

Detailed Method Info

execute (String $command)
Parameters:
$command :SEP command to execute.
Returns: String
Exceptions:
executeSEPException :
(Error)
If unable to execute SEP command on BEEP server.

Executes the specified command and returns the result in a String concept.

            $beep = BEEPClient.create("beep://guest:guest@host:port/DB")
            print $beep.execute("<request reqno='1'><fetch><union><intersect><compare subtree='xmlrpctest/1'><path/><value></value></compare></intersect></union></fetch></request>")
            -- the result is --
            The content of xmlrpctest/1 document will be returned:
            <testxml>
              <homedir path="/home/user"/>
            </testxml>
            

top