JSAMP is a pure Java library.
It should run on any Java Runtime Environment of version J2SE1.4 or above.
It does not require any external libraries, though see below.
In order to perform the necessry XML-RPC communications for use with
the SAMP Standard Profile, a pluggable layer is used.
This means that you can choose which XML-RPC library is used.
Currently, there are the following possibilities:
- Apache XML-RPC 1.2
- To use the Apache XML-RPC library, the Apache classes must be on the
class path. They can be found in the jar file
- A standalone library implementation is provided within JSAMP,
so if you wish to use this, no external dependencies are required.
This is currently a bit slower than the Apache implementation.
- Roll your own
- By implementing the class
you can provide your own implementation, perhaps based on a third party
In some cases you can choose which of these is used by supplying
particular implementations of the classes in the
package. Mostly though, an implementation will be chosen without any
explicit choice in the application code. In this case, you can control
which implementation is used by setting the value of the system property
jsamp.xmlrpc.impl to "apache", "internal" or the classname
XmlRpcKit implementation which has a no-arg constructor.
If you are embedding JSAMP into your own application code but want to
keep the size of the additional class files to a minimum, you can avoid
incorporating all of the classes in the built jar file.
The subordinate packages are arranged in a modular way.
They are organised as follows:
- Basic classes required throughout the library. You need these
whatever you're doing.
- Classes intended for use by application authors writing SAMP clients.
If you only need to run a SAMP hub, you do not need these classes.
- Classes providing the hub implementation.
If you are only writing a client which will not contain an embedded hub,
you do not need these classes.
- Utility classes providing GUI components for visual display of SAMP
activity. These classes are not required for basic client or hub
- Classes providing the hub test suite and some diagnostic tools intended
for debugging SAMP systems. These are not intended for use in third party
applications. This does not however contain unit tests for JSAMP
itself, which are not present in the distributed jar file.
- Classes which deal with implementing the Standard Profile of SAMP,
that is the XML-RPC-based communications.
Everything in the packages above is independent of the Profile used,
so if for some reason you are using a non-standard profile, you may
not need the
The classes here define a pluggable interface to XML-RPC implementations;
one or other of the provided implementations, or a custom-written one,
will be required as well to make use of these classes.
- Implementation of the pluggable XML-RPC layer based on the Apache XML-RPC
library. To use these classes you will need the Apache XML-RPC library
on the classpath as well. If you are using the internal XML-RPC
implementation, these classes are not required.
- Implementation of the pluggable XML-RPC layer which requires no
external libraries. If you are using the Apache library,
these classes are not required.