The smackjack Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The smackjack Reference Manual

This is the smackjack Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:35:39 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

This is the stub README.txt for the "smackjack" project.

Smackjack is a small Ajax framework written in Common Lisp.  Basically
Smackjack allows browser code call lisp functions via ajax and get a
return value. The code can be downloaded with all its dependencies
and loaded by quicklisp (10/2013).

Currently runs under Hunchentoot web server but there are plans
to allow other web servers. It was a fork of ht-simple-ajax and
aspires to be a replacement to the unmaintained and out of date
ht-ajax.

Differently than those two libraries, this one depends on parenscript
to generate client-side javascript and allows greater flexibility in
generated javascript.

Current version is compatible with ht-simple-ajax but it lacks many
features of ht-ajax.

The following features are addition to those available in ht-simple-ajax:

  * AJAX via Post as well as Get

  * response can be text, xml or json.

  * optional javascript namespaces to encapsulate generated javascript
    functions.
  
  * The arguments of the functions can be treated by cl-json before
    calling the function.


The code also contains a "pusher" subclass.  This allows a lisp
function call indirectly a javascript function defined in your lisp
code by parenscript but runs in the browser.  Basically the opposite
of SmackJack.  This is achieved by adding a simple polling mechanism.
Future development may include long polling.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 smackjack

Author

Andy Peterson <andy.arvid@gmail.com>

License

MIT

Description

A small Ajax framework for hunchentoot using parenscript

Version

0.1

Dependencies
Source

smackjack.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 smackjack/impl-dependent

Dependencies
Parent

smackjack (system)

Location

impl-dependent/

Component

sbcl.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 smackjack.asd

Location

smackjack.asd

Systems

smackjack (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 smackjack/package.lisp

Parent

smackjack (system)

Location

package.lisp

Packages

smackjack


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 smackjack/smackjack.lisp

Dependency

package.lisp (file)

Parent

smackjack (system)

Location

smackjack.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 smackjack/pusher.lisp

Dependency

smackjack.lisp (file)

Parent

smackjack (system)

Location

pusher.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.5 smackjack/impl-dependent/sbcl.lisp

Parent

impl-dependent (module)

Location

impl-dependent/sbcl.lisp

Internal Definitions

arglist (function)


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 smackjack

the one and only smackjack package. Contains all code to run the ajax framework.

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: defun-ajax NAME LAMBDA-LIST (PROCESSOR &rest REMOTE-KEYS) &body BODY

Macro to defun a server-side function that can be called from a client page. Example: (defun-ajax func1 (arg1 arg2) (*ajax-processor*)
(do-stuff))

Package

smackjack

Source

smackjack.lisp (file)

Macro: defun-push NAME LAMBDA-LIST (PROCESSOR &rest KEYS) &body BODY

declares and defines a ’push’ function that when called in lisp causes the correponding javascript function to be called in the client page. the body should be parenscript code to be compiled into javascript

Package

smackjack

Source

pusher.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Generic functions

Generic Function: ajax-function-prefix OBJECT
Generic Function: (setf ajax-function-prefix) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: ajax-function-prefix (AJAX-PROCESSOR ajax-processor)
Method: (setf ajax-function-prefix) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Symbol. Prefix for javascript functions corresponding
to lisp functions. Default is nil for no prefix.

Source

smackjack.lisp (file)

Generic Function: ajax-functions-namespace-p OBJECT
Generic Function: (setf ajax-functions-namespace-p) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: ajax-functions-namespace-p (AJAX-PROCESSOR ajax-processor)
Method: (setf ajax-functions-namespace-p) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Boolean. Place javascript functions corresponding
to lisp functions in the ajax-namespace. Default t.

Source

smackjack.lisp (file)

Generic Function: ajax-namespace OBJECT
Generic Function: (setf ajax-namespace) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: ajax-namespace (AJAX-PROCESSOR ajax-processor)
Method: (setf ajax-namespace) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Symbol or nil. Name for a namespace object for generated
javascript code. Nil means no namespace; code will be global

Source

smackjack.lisp (file)

Generic Function: create-ajax-dispatcher PROCESSOR

Creates a hunchentoot dispatcher for an ajax processor. One possible usage:
(push (create-ajax-dispatcher your-ajax-processor) hunchentoot:*dispatch-table*)

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: create-ajax-dispatcher (PROCESSOR ajax-processor)
Generic Function: default-content-type OBJECT
Generic Function: (setf default-content-type) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: default-content-type (AJAX-PROCESSOR ajax-processor)
Method: (setf default-content-type) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

String. The http content type that is sent with each response

Source

smackjack.lisp (file)

Generic Function: generate-prologue PROCESSOR &key WRAPPER

Creates a string that contains all the client-side
javascript code for the ajax communication. Optionally include <script> ... </script> html element wrapper. If including the wrapper, include this script in the <head> </head> of each html page. Without the wrapper, a virtual file can be done like: (define-easy-handler (js-ajax-code :uri "/ajax-code.js") ()
(when (boundp ’hunchentoot:*request*)
(setf (content-type*) "text/javascript"))
(generate-prologue *ajax-processor* :wrapper nil))

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: generate-prologue (PROCESSOR ajax-processor) &key WRAPPER
Generic Function: ht-simple-ajax-symbols-p OBJECT
Generic Function: (setf ht-simple-ajax-symbols-p) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: ht-simple-ajax-symbols-p (AJAX-PROCESSOR ajax-processor)
Method: (setf ht-simple-ajax-symbols-p) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Boolean. use ht-simple-ajax symbol processor to generate compatible ht-simple-ajax compatible code

Source

smackjack.lisp (file)

Generic Function: json-args-p OBJECT
Generic Function: (setf json-args-p) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: json-args-p (AJAX-PROCESSOR ajax-processor)
Method: (setf json-args-p) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Boolean. Ajax function arguments are passed using json

Source

smackjack.lisp (file)

Generic Function: pusher-poll-function-name OBJECT
Generic Function: (setf pusher-poll-function-name) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: pusher-poll-function-name (AJAX-PUSHER ajax-pusher)
Method: (setf pusher-poll-function-name) NEW-VALUE (AJAX-PUSHER ajax-pusher)

Name of the smackjack function called
on the client side when polling for pushes. Note: this name is a tag. The function does not actually exist on the server.

Source

pusher.lisp (file)

Method: (setf pusher-poll-function-name) (NEW-FUNCTION-NAME symbol) (PUSHER ajax-pusher) after
Source

pusher.lisp (file)

Method: (setf pusher-poll-function-name) (NEW-FUNCTION-NAME symbol) (PUSHER ajax-pusher) before
Source

pusher.lisp (file)

Generic Function: pusher-poll-interval OBJECT
Generic Function: (setf pusher-poll-interval) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: pusher-poll-interval (AJAX-PUSHER ajax-pusher)
Method: (setf pusher-poll-interval) NEW-VALUE (AJAX-PUSHER ajax-pusher)

The number of milliseconds between polls of the server for push calls.

Source

pusher.lisp (file)

Generic Function: pusher-poll-namespace OBJECT
Generic Function: (setf pusher-poll-namespace) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: pusher-poll-namespace (AJAX-PUSHER ajax-pusher)
Method: (setf pusher-poll-namespace) NEW-VALUE (AJAX-PUSHER ajax-pusher)

javascript namespace (i.e. object) to hold the polling code and the defined push functions

Source

pusher.lisp (file)

Generic Function: pusher-pushes-per-poll OBJECT
Generic Function: (setf pusher-pushes-per-poll) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: pusher-pushes-per-poll (AJAX-PUSHER ajax-pusher)
Method: (setf pusher-pushes-per-poll) NEW-VALUE (AJAX-PUSHER ajax-pusher)

Maximum number of pushes per poll.

Source

pusher.lisp (file)

Generic Function: server-uri OBJECT
Generic Function: (setf server-uri) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: server-uri (AJAX-PROCESSOR ajax-processor)
Method: (setf server-uri) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

String. The uri which is used to handle ajax request

Source

smackjack.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Classes

Class: ajax-processor ()

The principal and controlling class of this
library. The programmer will instantiate this class, define the ajax functions of the class and link the dispatcher to hunchentoot’s dispatcher. This processor will also generate javascript code that can be loaded to the browser.

Package

smackjack

Source

smackjack.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: ajax-functions

Hashtable maps the symbol names of the remoted functions to their ajax-function object

Type

hash-table

Initform

(make-hash-table :test (function equal))

Readers

ajax-functions (generic function)

Writers

(setf ajax-functions) (generic function)

Slot: ajax-namespace

Symbol or nil. Name for a namespace object for generated
javascript code. Nil means no namespace; code will be global

Type

symbol

Initargs

:ajax-namespace

Initform

(quote smackjack::smackjack)

Readers

ajax-namespace (generic function)

Writers

(setf ajax-namespace) (generic function)

Slot: ajax-functions-namespace-p

Boolean. Place javascript functions corresponding
to lisp functions in the ajax-namespace. Default t.

Type

boolean

Initargs

:ajax-functions-namespace-p

Initform

t

Readers

ajax-functions-namespace-p (generic function)

Writers

(setf ajax-functions-namespace-p) (generic function)

Slot: ajax-function-prefixn

Symbol. Prefix for javascript functions corresponding
to lisp functions. Default is nil for no prefix.

Type

symbol

Initargs

:ajax-function-prefix

Readers

ajax-function-prefix (generic function)

Writers

(setf ajax-function-prefix) (generic function)

Slot: ht-simple-ajax-symbols-p

Boolean. use ht-simple-ajax symbol processor to generate compatible ht-simple-ajax compatible code

Type

boolean

Initargs

:ht-simple-ajax-symbols-p

Readers

ht-simple-ajax-symbols-p (generic function)

Writers

(setf ht-simple-ajax-symbols-p) (generic function)

Slot: json-args-p

Boolean. Ajax function arguments are passed using json

Type

boolean

Initargs

:json-args-p

Initform

t

Readers

json-args-p (generic function)

Writers

(setf json-args-p) (generic function)

Slot: server-uri

String. The uri which is used to handle ajax request

Type

string

Initargs

:server-uri

Initform

"/ajax"

Readers

server-uri (generic function)

Writers

(setf server-uri) (generic function)

Slot: default-content-type

String. The http content type that is sent with each response

Type

string

Initargs

:default-content-type

Initform

"text/xml; charset=\"utf-8\""

Readers

default-content-type (generic function)

Writers

(setf default-content-type) (generic function)

Slot: reply-external-format

The format for the character output stream

Type

flexi-streams::external-format

Initargs

:reply-external-format

Initform

hunchentoot::+utf-8+

Readers

reply-external-format (generic function)

Writers

(setf reply-external-format) (generic function)

Class: ajax-pusher ()

The class adds pushing capabilities to ajax-processor.
The server can push function calls to the client. That is the lisp server code calls a function with arguments that will cause a corresponding function call on the client side.

Package

smackjack

Source

pusher.lisp (file)

Direct superclasses

ajax-processor (class)

Direct methods
Direct slots
Slot: poll-namespace

javascript namespace (i.e. object) to hold the polling code and the defined push functions

Type

symbol

Initargs

:poll-namespace

Initform

(quote smackjack::smackpusher)

Readers

pusher-poll-namespace (generic function)

Writers

(setf pusher-poll-namespace) (generic function)

Slot: poll-function-name

Name of the smackjack function called
on the client side when polling for pushes. Note: this name is a tag. The function does not actually exist on the server.

Type

symbol

Initargs

:poll-function-name

Initform

(quote smackjack::push-poll-request)

Readers

pusher-poll-function-name (generic function)

Writers

(setf pusher-poll-function-name) (generic function)

Slot: session-queue-name

pretty sure this is not used.

Type

symbol

Initargs

:session-queue-name

Initform

:smackpush-queue

Readers

pusher-session-queue-name (generic function)

Writers

(setf pusher-session-queue-name) (generic function)

Slot: poll-interval

The number of milliseconds between polls of the server for push calls.

Type

(integer 1)

Initargs

:poll-interval

Initform

5000

Readers

pusher-poll-interval (generic function)

Writers

(setf pusher-poll-interval) (generic function)

Slot: push-functions

Maps the symbol names of the remoted functions to their ajax-function object

Type

hash-table

Initform

(make-hash-table :test (function equal))

Readers

pusher-push-functions (generic function)

Writers

(setf pusher-push-functions) (generic function)

Slot: pushes-per-poll

Maximum number of pushes per poll.

Type

(integer 1)

Initargs

:pushes-per-poll

Initform

1

Readers

pusher-pushes-per-poll (generic function)

Writers

(setf pusher-pushes-per-poll) (generic function)

Class: ht-simple-ajax-processor ()

A sub-class designed to be compatible with ht-simple-ajax

Package

smackjack

Source

smackjack.lisp (file)

Direct superclasses

ajax-processor (class)

Direct slots
Slot: ajax-namespace
Slot: ajax-functions-namespace-p
Slot: ajax-function-prefix
Initform

(quote smackjack::ajax)

Slot: ht-simple-ajax-symbols-p
Initform

t

Slot: json-args-p

Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Functions

Function: arglist FUNCTION-DESIGNATOR
Package

smackjack

Source

sbcl.lisp (file)

Function: escape-string STRING

Escape all characters in STRING which pass TEST. This function is not guaranteed to return a fresh string. Note that you can pass NIL for STRING which’ll just be returned.

Package

smackjack

Source

smackjack.lisp (file)

Function: html-script-cdata JS &key NEWLINES

html script/cdata wrapper for javascript
wraps javascript in a <script> ... </script> html element

Package

smackjack

Source

smackjack.lisp (file)

Function: make-simple-js-symbol SYMBOL

this functions generates converts lisps symbols to format used by ht-simple-ajax and will be transformed by parenscript so that. they are compatibile with ht-simple-ajax.
helper function for making ’foo_bar_ out of ’foo-bar?

Package

smackjack

Source

smackjack.lisp (file)

Function: process-push-poll PUSHER ARGUMENTS

this is the default processor of the polling from the client.

Package

smackjack

Source

pusher.lisp (file)

Function: ps-http-request ()

returns parenscript (client) code to set up ajax request.

Package

smackjack

Source

smackjack.lisp (file)

Function: xml-wrapper STRING

wrapper for xml ajax response

Package

smackjack

Source

smackjack.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Generic functions

Generic Function: ajax-function-name PROCESSOR AJAX-FN

returns a string for the remote function name before parenscript processing

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ajax-function-name (PROCESSOR ajax-processor) (AJAX-FN remote-function)
Generic Function: ajax-functions OBJECT
Generic Function: (setf ajax-functions) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: ajax-functions (AJAX-PROCESSOR ajax-processor)
Method: (setf ajax-functions) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Hashtable maps the symbol names of the remoted functions to their ajax-function object

Source

smackjack.lisp (file)

Generic Function: ajax-ps-function PROCESSOR AJAX-FN

returns parenscript code to define a function on the
client that will call the corresponding server-side lisp function via ajax.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ajax-ps-function (PROCESSOR ajax-processor) (AJAX-FN ajax-function)
Generic Function: ajax-ps-parameters PROCESSOR AJAX-FN

returns a list of the arguments of the ajax-function ready for parenscript processing.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ajax-ps-parameters (PROCESSOR ajax-pusher) (AJAX-FN ajax-function)

Overriding the default method for ajax-processor because that method would fail on the pusher-poll-function. First checks if the
lisp function is the name given for the ajax-pusher’s poll processing function. If so, returns nil to indicate no parameters. If not, then call the ajax-processor method.

Source

pusher.lisp (file)

Method: ajax-ps-parameters (PROCESSOR ajax-processor) (AJAX-FN ajax-function)
Generic Function: ajax-response-process AJAX-FN

returns the symbol of the parenscript function that will handle the ajax response of the ajax-function

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ajax-response-process (AJAX-FN ajax-function)
Generic Function: call-lisp-function PROCESSOR AJAX-FUNCTION ARGUMENTS

This calls does the actual call of the ajax-lisp function.
Note: this is separate because it is overridden in the class ajax-pusher.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: call-lisp-function (PROCESSOR ajax-pusher) (FUNC ajax-function) ARGUMENTS

Overriding the default method for ajax-processor. First checks if the lisp function is the name given for the ajax-pusher’s poll processing function. If so, process push polls. If not, then call the ajax-processor method.

Source

pusher.lisp (file)

Method: call-lisp-function (PROCESSOR ajax-processor) (FUNC ajax-function) ARGUMENTS
Generic Function: callback-data OBJECT
Generic Function: (setf callback-data) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: callback-data (AJAX-FUNCTION ajax-function)
Method: (setf callback-data) NEW-VALUE (AJAX-FUNCTION ajax-function)

argument passed to callback function from ajax response. Content-type should correspond.

Source

smackjack.lisp (file)

Generic Function: generate-prologue-javascript PROCESSOR

generates a string of raw javascript code that needs to be
loaded on the client side for the ajax-processor to function correctly. This code can be embedded in a file, a virtual file, or generated html.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: generate-prologue-javascript (PROCESSOR ajax-pusher)

returns javascript code for the entire pusher/ajax processor.
Calls the inherited method from ajax-processor and adds in code for the pusher.

Source

pusher.lisp (file)

Method: generate-prologue-javascript (PROCESSOR ajax-processor)
Generic Function: get-content-type PROCESSOR AJAX-FN

return the content type string for ajax-function response.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: get-content-type (PROCESSOR ajax-processor) (AJAX-FN ajax-function)
Generic Function: http-method OBJECT
Generic Function: (setf http-method) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: http-method (AJAX-FUNCTION ajax-function)
Method: (setf http-method) NEW-VALUE (AJAX-FUNCTION ajax-function)

http method of the lisp ajax function

Source

smackjack.lisp (file)

Generic Function: name OBJECT
Package

smackjack

Methods
Method: name (REMOTE-FUNCTION remote-function)

symbol name of the lisp function

Source

smackjack.lisp (file)

Generic Function: process-ajax-request PROCESSOR

This should called on each ajax request. That is the
ajax uri is identified and dispatched by hunchentoot. See CREATE-AJAX-DISPATCHER. It parses the parameters from the http request, calls the lisp function and returns the response.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: process-ajax-request (PROCESSOR ajax-processor)
Generic Function: ps-ajax-call PROCESSOR

returns parenscript code to define a client-side function
for the ajax-processor that initiates an ajax call of a server-side lisp function

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ps-ajax-call (PROCESSOR ajax-processor)
Generic Function: ps-ajax-response-processes PROCESSOR

returns client parenscript code to define functions to handle the various types of ajax responses

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ps-ajax-response-processes (PROCESSOR ajax-processor)
Generic Function: ps-encode-args PROCESSOR

returns parenscript code to define a client-side function that encodes the arguments to be passed along with an ajax/http request.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ps-encode-args (PROCESSOR ajax-processor)
Generic Function: ps-fetch-uri PROCESSOR

Return parenscript code to define client-side fetch-uri
which initiates ajax request and sets up callback/error treatment.

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: ps-fetch-uri (PROCESSOR ajax-processor)
Generic Function: ps-push-functions PUSHER

returns parenscript code to define all the push-functions on the client

Package

smackjack

Source

pusher.lisp (file)

Methods
Method: ps-push-functions (PUSHER ajax-pusher)
Generic Function: push-default-sessions OBJECT
Generic Function: (setf push-default-sessions) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: push-default-sessions (PUSH-FUNCTION push-function)
Method: (setf push-default-sessions) NEW-VALUE (PUSH-FUNCTION push-function)

If a push function is called and the hunchentoot
sessions are not specified, this will determine which in sessions the push call happens on the client side.

Source

pusher.lisp (file)

Generic Function: push-function PUSHER FUNCTION-NAME ARGUMENTS &optional SESSIONS

This function is called when you want to push a function
call to the client(s) as specified in the parameter sessions. Note: the programmer should not call this directly.

Package

smackjack

Source

pusher.lisp (file)

Methods
Method: push-function (PUSHER ajax-pusher) FUNCTION-NAME ARGUMENTS &optional SESSIONS
Generic Function: push-function-sessions PUSH-FUNCTION

Returns a list of Hunchentoot sessions for a push-function based on the slot default-sessions

Package

smackjack

Source

pusher.lisp (file)

Methods
Method: push-function-sessions (PUSH-FUNCTION push-function)
Generic Function: push-ps-code OBJECT
Generic Function: (setf push-ps-code) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: push-ps-code (PUSH-FUNCTION push-function)
Method: (setf push-ps-code) NEW-VALUE (PUSH-FUNCTION push-function)

parenscript code to be compiled and sent to the browser on page load

Source

pusher.lisp (file)

Generic Function: push-ps-function PUSHER PUSH-FUNCTION

returns parenscript code for the push-function to be defined on the client

Package

smackjack

Source

pusher.lisp (file)

Methods
Method: push-ps-function (PUSHER ajax-pusher) (PUSH-FUNCTION push-function)
Generic Function: pusher-push-functions OBJECT
Generic Function: (setf pusher-push-functions) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: pusher-push-functions (AJAX-PUSHER ajax-pusher)
Method: (setf pusher-push-functions) NEW-VALUE (AJAX-PUSHER ajax-pusher)

Maps the symbol names of the remoted functions to their ajax-function object

Source

pusher.lisp (file)

Generic Function: pusher-session-queue-name OBJECT
Generic Function: (setf pusher-session-queue-name) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: pusher-session-queue-name (AJAX-PUSHER ajax-pusher)
Method: (setf pusher-session-queue-name) NEW-VALUE (AJAX-PUSHER ajax-pusher)

pretty sure this is not used.

Source

pusher.lisp (file)

Generic Function: pushify-function PUSHER FUNCTION-NAME PS-CODE &key REMOTE-NAME DEFAULT-SESSIONS

Function to create a push-function and store it in the pusher object.

Package

smackjack

Source

pusher.lisp (file)

Methods
Method: pushify-function (PUSHER ajax-pusher) FUNCTION-NAME PS-CODE &key REMOTE-NAME DEFAULT-SESSIONS
Generic Function: remote-name OBJECT
Generic Function: (setf remote-name) NEW-VALUE OBJECT
Package

smackjack

Methods
Method: remote-name (REMOTE-FUNCTION remote-function)
Method: (setf remote-name) NEW-VALUE (REMOTE-FUNCTION remote-function)

remote name of the function

Source

smackjack.lisp (file)

Generic Function: remotify-function PROCESSOR FUNCTION-NAME &key METHOD REMOTE-NAME CONTENT-TYPE CALLBACK-DATA

Creates a remote ajax-function identified by its symbol and symbol-name and attaches it to the ajax-processor

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: remotify-function (PROCESSOR ajax-processor) FUNCTION-NAME &key METHOD REMOTE-NAME CONTENT-TYPE CALLBACK-DATA
Generic Function: un-remotify-function PROCESSOR FUNCTION-NAME

remove a remote function identified by its symbol or name from the ajax-processor

Package

smackjack

Source

smackjack.lisp (file)

Methods
Method: un-remotify-function (PROCESSOR ajax-processor) SYMBOL-OR-NAME

Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Classes

Class: ajax-function ()

Class for browser functions that call a server-side lisp function using ajax

Package

smackjack

Source

smackjack.lisp (file)

Direct superclasses

remote-function (class)

Direct methods
Direct slots
Slot: method

http method of the lisp ajax function

Type

(quote (member :post :get))

Initargs

:method

Initform

:get

Readers

http-method (generic function)

Writers

(setf http-method) (generic function)

Slot: callback-data

argument passed to callback function from ajax response. Content-type should correspond.

Type

(quote (member :request-object :response-xml :response-text :response-xml-text :json))

Initargs

:callback-data

Initform

:response-xml

Readers

callback-data (generic function)

Writers

(setf callback-data) (generic function)

Slot: content-type

The http content type that is sent with each response

Type

(or null string)

Initargs

:content-type

Initform

"text/xml;"

Readers

content-type (generic function)

Writers

(setf content-type) (generic function)

Class: push-function ()

This class represents functions that are pushed to the client.

Package

smackjack

Source

pusher.lisp (file)

Direct superclasses

remote-function (class)

Direct methods
Direct slots
Slot: ps-code

parenscript code to be compiled and sent to the browser on page load

Type

list

Initargs

:ps-code

Readers

push-ps-code (generic function)

Writers

(setf push-ps-code) (generic function)

Slot: default-sessions

If a push function is called and the hunchentoot
sessions are not specified, this will determine which in sessions the push call happens on the client side.

Type

(quote (member :current-session :acceptor-sessions :acceptor-sessions-except-current))

Initargs

:default-sessions

Initform

:acceptor-sessions

Readers

push-default-sessions (generic function)

Writers

(setf push-default-sessions) (generic function)

Class: remote-function ()

Base class for remote functions between server and browser

Package

smackjack

Source

smackjack.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: name

symbol name of the lisp function

Type

symbol

Initargs

:name

Readers

name (generic function)

Slot: remote-name

remote name of the function

Type

symbol

Initargs

:remote-name

Readers

remote-name (generic function)

Writers

(setf remote-name) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M   S  
Index Entry  Section

F
File, Lisp, smackjack.asd: The smackjack<dot>asd file
File, Lisp, smackjack/impl-dependent/sbcl.lisp: The smackjack/impl-dependent/sbcl<dot>lisp file
File, Lisp, smackjack/package.lisp: The smackjack/package<dot>lisp file
File, Lisp, smackjack/pusher.lisp: The smackjack/pusher<dot>lisp file
File, Lisp, smackjack/smackjack.lisp: The smackjack/smackjack<dot>lisp file

L
Lisp File, smackjack.asd: The smackjack<dot>asd file
Lisp File, smackjack/impl-dependent/sbcl.lisp: The smackjack/impl-dependent/sbcl<dot>lisp file
Lisp File, smackjack/package.lisp: The smackjack/package<dot>lisp file
Lisp File, smackjack/pusher.lisp: The smackjack/pusher<dot>lisp file
Lisp File, smackjack/smackjack.lisp: The smackjack/smackjack<dot>lisp file

M
Module, smackjack/impl-dependent: The smackjack/impl-dependent module

S
smackjack.asd: The smackjack<dot>asd file
smackjack/impl-dependent: The smackjack/impl-dependent module
smackjack/impl-dependent/sbcl.lisp: The smackjack/impl-dependent/sbcl<dot>lisp file
smackjack/package.lisp: The smackjack/package<dot>lisp file
smackjack/pusher.lisp: The smackjack/pusher<dot>lisp file
smackjack/smackjack.lisp: The smackjack/smackjack<dot>lisp file

Jump to:   F   L   M   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   E   F   G   H   J   M   N   P   R   S   U   X  
Index Entry  Section

(
(setf ajax-function-prefix): Exported generic functions
(setf ajax-function-prefix): Exported generic functions
(setf ajax-functions): Internal generic functions
(setf ajax-functions): Internal generic functions
(setf ajax-functions-namespace-p): Exported generic functions
(setf ajax-functions-namespace-p): Exported generic functions
(setf ajax-namespace): Exported generic functions
(setf ajax-namespace): Exported generic functions
(setf callback-data): Internal generic functions
(setf callback-data): Internal generic functions
(setf default-content-type): Exported generic functions
(setf default-content-type): Exported generic functions
(setf ht-simple-ajax-symbols-p): Exported generic functions
(setf ht-simple-ajax-symbols-p): Exported generic functions
(setf http-method): Internal generic functions
(setf http-method): Internal generic functions
(setf json-args-p): Exported generic functions
(setf json-args-p): Exported generic functions
(setf push-default-sessions): Internal generic functions
(setf push-default-sessions): Internal generic functions
(setf push-ps-code): Internal generic functions
(setf push-ps-code): Internal generic functions
(setf pusher-poll-function-name): Exported generic functions
(setf pusher-poll-function-name): Exported generic functions
(setf pusher-poll-function-name): Exported generic functions
(setf pusher-poll-function-name): Exported generic functions
(setf pusher-poll-interval): Exported generic functions
(setf pusher-poll-interval): Exported generic functions
(setf pusher-poll-namespace): Exported generic functions
(setf pusher-poll-namespace): Exported generic functions
(setf pusher-push-functions): Internal generic functions
(setf pusher-push-functions): Internal generic functions
(setf pusher-pushes-per-poll): Exported generic functions
(setf pusher-pushes-per-poll): Exported generic functions
(setf pusher-session-queue-name): Internal generic functions
(setf pusher-session-queue-name): Internal generic functions
(setf remote-name): Internal generic functions
(setf remote-name): Internal generic functions
(setf server-uri): Exported generic functions
(setf server-uri): Exported generic functions

A
ajax-function-name: Internal generic functions
ajax-function-name: Internal generic functions
ajax-function-prefix: Exported generic functions
ajax-function-prefix: Exported generic functions
ajax-functions: Internal generic functions
ajax-functions: Internal generic functions
ajax-functions-namespace-p: Exported generic functions
ajax-functions-namespace-p: Exported generic functions
ajax-namespace: Exported generic functions
ajax-namespace: Exported generic functions
ajax-ps-function: Internal generic functions
ajax-ps-function: Internal generic functions
ajax-ps-parameters: Internal generic functions
ajax-ps-parameters: Internal generic functions
ajax-ps-parameters: Internal generic functions
ajax-response-process: Internal generic functions
ajax-response-process: Internal generic functions
arglist: Internal functions

C
call-lisp-function: Internal generic functions
call-lisp-function: Internal generic functions
call-lisp-function: Internal generic functions
callback-data: Internal generic functions
callback-data: Internal generic functions
create-ajax-dispatcher: Exported generic functions
create-ajax-dispatcher: Exported generic functions

D
default-content-type: Exported generic functions
default-content-type: Exported generic functions
defun-ajax: Exported macros
defun-push: Exported macros

E
escape-string: Internal functions

F
Function, arglist: Internal functions
Function, escape-string: Internal functions
Function, html-script-cdata: Internal functions
Function, make-simple-js-symbol: Internal functions
Function, process-push-poll: Internal functions
Function, ps-http-request: Internal functions
Function, xml-wrapper: Internal functions

G
generate-prologue: Exported generic functions
generate-prologue: Exported generic functions
generate-prologue-javascript: Internal generic functions
generate-prologue-javascript: Internal generic functions
generate-prologue-javascript: Internal generic functions
Generic Function, (setf ajax-function-prefix): Exported generic functions
Generic Function, (setf ajax-functions): Internal generic functions
Generic Function, (setf ajax-functions-namespace-p): Exported generic functions
Generic Function, (setf ajax-namespace): Exported generic functions
Generic Function, (setf callback-data): Internal generic functions
Generic Function, (setf default-content-type): Exported generic functions
Generic Function, (setf ht-simple-ajax-symbols-p): Exported generic functions
Generic Function, (setf http-method): Internal generic functions
Generic Function, (setf json-args-p): Exported generic functions
Generic Function, (setf push-default-sessions): Internal generic functions
Generic Function, (setf push-ps-code): Internal generic functions
Generic Function, (setf pusher-poll-function-name): Exported generic functions
Generic Function, (setf pusher-poll-interval): Exported generic functions
Generic Function, (setf pusher-poll-namespace): Exported generic functions
Generic Function, (setf pusher-push-functions): Internal generic functions
Generic Function, (setf pusher-pushes-per-poll): Exported generic functions
Generic Function, (setf pusher-session-queue-name): Internal generic functions
Generic Function, (setf remote-name): Internal generic functions
Generic Function, (setf server-uri): Exported generic functions
Generic Function, ajax-function-name: Internal generic functions
Generic Function, ajax-function-prefix: Exported generic functions
Generic Function, ajax-functions: Internal generic functions
Generic Function, ajax-functions-namespace-p: Exported generic functions
Generic Function, ajax-namespace: Exported generic functions
Generic Function, ajax-ps-function: Internal generic functions
Generic Function, ajax-ps-parameters: Internal generic functions
Generic Function, ajax-response-process: Internal generic functions
Generic Function, call-lisp-function: Internal generic functions
Generic Function, callback-data: Internal generic functions
Generic Function, create-ajax-dispatcher: Exported generic functions
Generic Function, default-content-type: Exported generic functions
Generic Function, generate-prologue: Exported generic functions
Generic Function, generate-prologue-javascript: Internal generic functions
Generic Function, get-content-type: Internal generic functions
Generic Function, ht-simple-ajax-symbols-p: Exported generic functions
Generic Function, http-method: Internal generic functions
Generic Function, json-args-p: Exported generic functions
Generic Function, name: Internal generic functions
Generic Function, process-ajax-request: Internal generic functions
Generic Function, ps-ajax-call: Internal generic functions
Generic Function, ps-ajax-response-processes: Internal generic functions
Generic Function, ps-encode-args: Internal generic functions
Generic Function, ps-fetch-uri: Internal generic functions
Generic Function, ps-push-functions: Internal generic functions
Generic Function, push-default-sessions: Internal generic functions
Generic Function, push-function: Internal generic functions
Generic Function, push-function-sessions: Internal generic functions
Generic Function, push-ps-code: Internal generic functions
Generic Function, push-ps-function: Internal generic functions
Generic Function, pusher-poll-function-name: Exported generic functions
Generic Function, pusher-poll-interval: Exported generic functions
Generic Function, pusher-poll-namespace: Exported generic functions
Generic Function, pusher-push-functions: Internal generic functions
Generic Function, pusher-pushes-per-poll: Exported generic functions
Generic Function, pusher-session-queue-name: Internal generic functions
Generic Function, pushify-function: Internal generic functions
Generic Function, remote-name: Internal generic functions
Generic Function, remotify-function: Internal generic functions
Generic Function, server-uri: Exported generic functions
Generic Function, un-remotify-function: Internal generic functions
get-content-type: Internal generic functions
get-content-type: Internal generic functions

H
ht-simple-ajax-symbols-p: Exported generic functions
ht-simple-ajax-symbols-p: Exported generic functions
html-script-cdata: Internal functions
http-method: Internal generic functions
http-method: Internal generic functions

J
json-args-p: Exported generic functions
json-args-p: Exported generic functions

M
Macro, defun-ajax: Exported macros
Macro, defun-push: Exported macros
make-simple-js-symbol: Internal functions
Method, (setf ajax-function-prefix): Exported generic functions
Method, (setf ajax-functions): Internal generic functions
Method, (setf ajax-functions-namespace-p): Exported generic functions
Method, (setf ajax-namespace): Exported generic functions
Method, (setf callback-data): Internal generic functions
Method, (setf default-content-type): Exported generic functions
Method, (setf ht-simple-ajax-symbols-p): Exported generic functions
Method, (setf http-method): Internal generic functions
Method, (setf json-args-p): Exported generic functions
Method, (setf push-default-sessions): Internal generic functions
Method, (setf push-ps-code): Internal generic functions
Method, (setf pusher-poll-function-name): Exported generic functions
Method, (setf pusher-poll-function-name): Exported generic functions
Method, (setf pusher-poll-function-name): Exported generic functions
Method, (setf pusher-poll-interval): Exported generic functions
Method, (setf pusher-poll-namespace): Exported generic functions
Method, (setf pusher-push-functions): Internal generic functions
Method, (setf pusher-pushes-per-poll): Exported generic functions
Method, (setf pusher-session-queue-name): Internal generic functions
Method, (setf remote-name): Internal generic functions
Method, (setf server-uri): Exported generic functions
Method, ajax-function-name: Internal generic functions
Method, ajax-function-prefix: Exported generic functions
Method, ajax-functions: Internal generic functions
Method, ajax-functions-namespace-p: Exported generic functions
Method, ajax-namespace: Exported generic functions
Method, ajax-ps-function: Internal generic functions
Method, ajax-ps-parameters: Internal generic functions
Method, ajax-ps-parameters: Internal generic functions
Method, ajax-response-process: Internal generic functions
Method, call-lisp-function: Internal generic functions
Method, call-lisp-function: Internal generic functions
Method, callback-data: Internal generic functions
Method, create-ajax-dispatcher: Exported generic functions
Method, default-content-type: Exported generic functions
Method, generate-prologue: Exported generic functions
Method, generate-prologue-javascript: Internal generic functions
Method, generate-prologue-javascript: Internal generic functions
Method, get-content-type: Internal generic functions
Method, ht-simple-ajax-symbols-p: Exported generic functions
Method, http-method: Internal generic functions
Method, json-args-p: Exported generic functions
Method, name: Internal generic functions
Method, process-ajax-request: Internal generic functions
Method, ps-ajax-call: Internal generic functions
Method, ps-ajax-response-processes: Internal generic functions
Method, ps-encode-args: Internal generic functions
Method, ps-fetch-uri: Internal generic functions
Method, ps-push-functions: Internal generic functions
Method, push-default-sessions: Internal generic functions
Method, push-function: Internal generic functions
Method, push-function-sessions: Internal generic functions
Method, push-ps-code: Internal generic functions
Method, push-ps-function: Internal generic functions
Method, pusher-poll-function-name: Exported generic functions
Method, pusher-poll-interval: Exported generic functions
Method, pusher-poll-namespace: Exported generic functions
Method, pusher-push-functions: Internal generic functions
Method, pusher-pushes-per-poll: Exported generic functions
Method, pusher-session-queue-name: Internal generic functions
Method, pushify-function: Internal generic functions
Method, remote-name: Internal generic functions
Method, remotify-function: Internal generic functions
Method, server-uri: Exported generic functions
Method, un-remotify-function: Internal generic functions

N
name: Internal generic functions
name: Internal generic functions

P
process-ajax-request: Internal generic functions
process-ajax-request: Internal generic functions
process-push-poll: Internal functions
ps-ajax-call: Internal generic functions
ps-ajax-call: Internal generic functions
ps-ajax-response-processes: Internal generic functions
ps-ajax-response-processes: Internal generic functions
ps-encode-args: Internal generic functions
ps-encode-args: Internal generic functions
ps-fetch-uri: Internal generic functions
ps-fetch-uri: Internal generic functions
ps-http-request: Internal functions
ps-push-functions: Internal generic functions
ps-push-functions: Internal generic functions
push-default-sessions: Internal generic functions
push-default-sessions: Internal generic functions
push-function: Internal generic functions
push-function: Internal generic functions
push-function-sessions: Internal generic functions
push-function-sessions: Internal generic functions
push-ps-code: Internal generic functions
push-ps-code: Internal generic functions
push-ps-function: Internal generic functions
push-ps-function: Internal generic functions
pusher-poll-function-name: Exported generic functions
pusher-poll-function-name: Exported generic functions
pusher-poll-interval: Exported generic functions
pusher-poll-interval: Exported generic functions
pusher-poll-namespace: Exported generic functions
pusher-poll-namespace: Exported generic functions
pusher-push-functions: Internal generic functions
pusher-push-functions: Internal generic functions
pusher-pushes-per-poll: Exported generic functions
pusher-pushes-per-poll: Exported generic functions
pusher-session-queue-name: Internal generic functions
pusher-session-queue-name: Internal generic functions
pushify-function: Internal generic functions
pushify-function: Internal generic functions

R
remote-name: Internal generic functions
remote-name: Internal generic functions
remotify-function: Internal generic functions
remotify-function: Internal generic functions

S
server-uri: Exported generic functions
server-uri: Exported generic functions

U
un-remotify-function: Internal generic functions
un-remotify-function: Internal generic functions

X
xml-wrapper: Internal functions

Jump to:   (  
A   C   D   E   F   G   H   J   M   N   P   R   S   U   X  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   A   C   D   H   J   M   N   P   R   S  
Index Entry  Section

A
ajax-function-prefix: Exported classes
ajax-function-prefixn: Exported classes
ajax-functions: Exported classes
ajax-functions-namespace-p: Exported classes
ajax-functions-namespace-p: Exported classes
ajax-namespace: Exported classes
ajax-namespace: Exported classes

C
callback-data: Internal classes
content-type: Internal classes

D
default-content-type: Exported classes
default-sessions: Internal classes

H
ht-simple-ajax-symbols-p: Exported classes
ht-simple-ajax-symbols-p: Exported classes

J
json-args-p: Exported classes
json-args-p: Exported classes

M
method: Internal classes

N
name: Internal classes

P
poll-function-name: Exported classes
poll-interval: Exported classes
poll-namespace: Exported classes
ps-code: Internal classes
push-functions: Exported classes
pushes-per-poll: Exported classes

R
remote-name: Internal classes
reply-external-format: Exported classes

S
server-uri: Exported classes
session-queue-name: Exported classes
Slot, ajax-function-prefix: Exported classes
Slot, ajax-function-prefixn: Exported classes
Slot, ajax-functions: Exported classes
Slot, ajax-functions-namespace-p: Exported classes
Slot, ajax-functions-namespace-p: Exported classes
Slot, ajax-namespace: Exported classes
Slot, ajax-namespace: Exported classes
Slot, callback-data: Internal classes
Slot, content-type: Internal classes
Slot, default-content-type: Exported classes
Slot, default-sessions: Internal classes
Slot, ht-simple-ajax-symbols-p: Exported classes
Slot, ht-simple-ajax-symbols-p: Exported classes
Slot, json-args-p: Exported classes
Slot, json-args-p: Exported classes
Slot, method: Internal classes
Slot, name: Internal classes
Slot, poll-function-name: Exported classes
Slot, poll-interval: Exported classes
Slot, poll-namespace: Exported classes
Slot, ps-code: Internal classes
Slot, push-functions: Exported classes
Slot, pushes-per-poll: Exported classes
Slot, remote-name: Internal classes
Slot, reply-external-format: Exported classes
Slot, server-uri: Exported classes
Slot, session-queue-name: Exported classes

Jump to:   A   C   D   H   J   M   N   P   R   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   C   H   P   R   S  
Index Entry  Section

A
ajax-function: Internal classes
ajax-processor: Exported classes
ajax-pusher: Exported classes

C
Class, ajax-function: Internal classes
Class, ajax-processor: Exported classes
Class, ajax-pusher: Exported classes
Class, ht-simple-ajax-processor: Exported classes
Class, push-function: Internal classes
Class, remote-function: Internal classes

H
ht-simple-ajax-processor: Exported classes

P
Package, smackjack: The smackjack package
push-function: Internal classes

R
remote-function: Internal classes

S
smackjack: The smackjack system
smackjack: The smackjack package
System, smackjack: The smackjack system

Jump to:   A   C   H   P   R   S