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 necessary 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:
- A standalone library implementation is provided within JSAMP,
so if you wish to use this, no external dependencies are required.
- 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
- 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
The internal implementation was introduced as an experimental measure,
but it seems to be quite reliable and of comparable speed to the Apache one.
The internal implementation is therefore recommended for most purposes.
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.
- 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 for the Bridge application, which can connect two or more hubs
- Simple HTTP server implementation. This is required by the internal
XML-RPC implementation. It may also provide useful utility functionality
for client applications who wish to serve resources over HTTP.
- Classes which deal with XML-RPC based communications and the
implementation of the Standard Profile.
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
or a home-grown XML-RPC implementation, these classes are not required.
- Implementation of the Web Profile hub and clients. The Web Profile
is XML-RPC based, and requires some of the classes in the
org.astrogrid.samp.xmlrpc* packages as well.