|
NAMEOpenXPKI::Client - OpenXPKI Client base libraryVERSIONThis document describes OpenXPKI::Client version 0.0.1SYNOPSISuse OpenXPKI::Client; my $client = OpenXPKI::Client->new( { SOCKETFILE => './foo.socket', }); # create new session $client->init_session(); DESCRIPTIONOpenXPKI::Client is a base class for client communication with an OpenXPKI server daemon.INTERFACEBUILDSee perldoc Class::Std.STARTSee perldoc Class::Std.talkExpects a hash reference as first argument. Serializes the argument and sends it to the OpenXPKI server. Throws an exception if the connection is not in communication state 'can_send'.collectReads an answer from the OpenXPKI server, deserializes the message and returns the corresponding data structure. Throws an exception if the connection is not in communication state 'can_receive'.get_communication_stateGet internal communication state. Returns 'can_send' if the next action should be a talk() call. Returns 'can_receive' if the next action should be a collect() call.send_service_msgSend a service message. The first argument must be a string identifying the service command to send. The (optional) second argument is a hash reference containing the arguments to be sent along with the service message. The caller must assure that this argument is properly specified.send_command_msgSend a service command message. The first argument must be a string identifying the command to send. The (optional) second argument is a hash reference containing the arguments to be sent along with the command message.send_receive_service_msgSend a service message, reads the response and returns it. See send_service_msg.send_receive_command_msgSend a service command message, reads the response and returns it. See send_command_msg.init_sessionInitialize session. If the named argument SESSION_ID exists, this session is re-opened. If it can not be loaded, and expcetion is thrown. If you don't pass a session id, a new session is created. If you want to create a new session if the existing one is no longer available, pass NEW_ON_FAIL with a true value as extra argument.Returns the first server response (see collect()). rekey_sessionAssign a new session id to the existing session. The old session id is deleted. Returns the new session id.get_session_idReturns current session ID (or undef if no session is active).set_timeoutSet socket read timeout (seconds, default: 30).close_connectionCloses the socket connection to the server.DIAGNOSTICSis_connectedreturns true on a normal established connection. Returns false if the connection is missing or something goes wrong during the check.is_logged_inreturns true if a connection is available and the user has finished authentication (i.e. PING returns 'SERVICE_READY').CONFIGURATION AND ENVIRONMENTOpenXPKI::Client requires no configuration files or environment variables.DEPENDENCIESRequires an OpenXPKI perl core module installation.INCOMPATIBILITIESNone reported.BUGS AND LIMITATIONSNo bugs have been reported.Please report any bugs or feature requests to the OpenXPKI mailing list or its project home page http://www.openxpki.org/. AUTHORMartin Bartosch "<m.bartosch@cynops.de>"LICENCE AND COPYRIGHTWritten 2006 by Martin Bartosch for the OpenXPKI project Copyright (C) 2006 by The OpenXPKI ProjectSee the LICENSE file for license details. DISCLAIMER OF WARRANTYBECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Visit the GSP FreeBSD Man Page Interface. |