External Dependencies
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
xmlrpc-1.2-b1.jar.
- Internal
- 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
org.astrogrid.samp.xmlrpc.XmlRpcKit
you can provide your own implementation, perhaps based on a third party
XML-RPC library.
In some cases you can choose which of these is used by supplying
particular implementations of the classes in the xmlrpc
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
of an XmlRpcKit implementation which has a no-arg constructor.
See XmlRpcKit.IMPL_PROP.
Internal Dependencies
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:
- org.astrogrid.samp
- Basic classes required throughout the library. You need these
whatever you're doing.
- org.astrogrid.samp.client
- 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.
- org.astrogrid.samp.hub
- 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.
- org.astrogrid.samp.gui
- Utility classes providing GUI components for visual display of SAMP
activity. These classes are not required for basic client or hub
operations.
- org.astrogrid.samp.test
- 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.
- org.astrogrid.samp.xmlrpc
- 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
xmlrpc* packages.
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.
- org.astrogrid.samp.xmlrpc.apache
- 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.
- org.astrogrid.samp.xmlrpc.internal
- Implementation of the pluggable XML-RPC layer which requires no
external libraries. If you are using the Apache library,
these classes are not required.