<?xml version="1.0"?>

<document>
<properties>
<title>Change Log</title>
<author email="m.b.taylor@bristol.ac.uk">Mark Taylor</author>
</properties>

<body>

<section name="Version History">

<ul>
<li><a href="#Version_0_1"  >Version 0.1</a></li>
<li><a href="#Version_0_2"  >Version 0.2</a></li>
<li><a href="#Version_0_2-1">Version 0.2-1</a></li>
<li><a href="#Version_0_3"  >Version 0.3</a></li>
<li><a href="#Version_0_3-1">Version 0.3-1</a></li>
<li><a href="#Version_1_0"  >Version 1.0</a></li>
<li><a href="#Version_1_1"  >Version 1.1</a></li>
<li><a href="#Version_1_2"  >Version 1.2</a></li>
<li><a href="#Version_1_3"  >Version 1.3</a></li>
<li><a href="#Version_1_3-1">Version 1.3-1</a></li>
<li><a href="#Version_1.3-2">Version 1.3-2</a></li>
<li><a href="#Version_1.3-3">Version 1.3-3</a></li>
<li><a href="#Version_1.3-4">Version 1.3-4</a></li>
<li><a href="#Version_1.3.5">Version 1.3.5</a></li>
<li><a href="#Version_1.3.6">Version 1.3.6</a></li>
<li><a href="#Version_1.3.7">Version 1.3.7</a></li>
</ul>

<subsection name="Version 0.1">
<p>
<strong>Date:</strong> 31 Jul 2008<br/>
</p>

<p>Initial release (beta).  Targets SAMP WD v1.0 (25 June 2008).
</p>
</subsection>

<subsection name="Version 0.2">
<p>
<strong>Date:</strong> 19 Sep 2008<br/>
</p>

<dl>
<dt>Code reorganisation and pluggable XML-RPC implementation:</dt>
<dd>The XML-RPC and Standard Profile-related parts of the library have
    been reorganised somewhat.
    A new package 
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/xmlrpc/package-summary.html"
                    >org.astrogrid.samp.xmlrpc</a>
    ant its descendants now hold all
    the code which relates specifically to XML-RPC communications and
    the SAMP Standard Profile; the code in the other packages is 
    profile-agnostic and handles only transport-independent aspects
    of the protocol.
    The <code>xmlrpc</code> package itself defines a pluggable 
    interface for providing XML-RPC client and server functionality;
    two implementations are also provided, in the packages 
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/xmlrpc/apache/package-summary.html"
                                       >xmlrpc.apache</a>
    and
    <a target="samp-javadoc"
      href="apidocs/org/astrogrid/samp/xmlrpc/internal/package-summary.html"
                                      >xmlrpc.internal</a>.
    The Apache one is basically what was there in previous versions;
    the internal one is completely freestanding, and if this is used
    the Apache XML-RPC library is not required for operation.
    </dd>
<dt>GUI functionality added</dt>
<dd>There are more classes in the 
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/gui/package-summary.html"
                    >org.astrogrid.samp.gui</a> package
    to facilitate high-level use of SAMP within GUI applications.
    <code>ConnectorGui</code>
    provides Actions suitable for insertion in a general SAMP control menu,
    and
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/gui/SendActionManager.html"
                                           >SendActionManager</a>
    provides menus and Actions for sending particular messages.
    </dd> 
<dt>New command <a href="commands.html#Snooper"><code>snooper</code></a>:</dt>
<dd>Logs received messages to the terminal.
    Useful for debugging.
    </dd>
<dt>Minor changes:</dt>
<dd><ul>
    <li>Moved some GUI functionality from <code>client.HubConnector</code>
    to <code>gui.ConnectorGui</code>.</li>
    <li><code>HubClient</code> privateKey member is now an Object
        not a String, for greater generality.</li>
    <li><code>RegInfo(String,String,String)</code> constructor
        withdrawn.</li>
    <li><code>HubRunner</code> class moved from package <code>hub</code>
        to <code>xmlrpc</code>.</li>
    <li>Several other more or less minor changes.</li>
    </ul>
    </dd>
</dl>
</subsection>

<subsection name="Version 0.2-1">
<p>
<strong>Date:</strong> 25 Sep 2008<br/>
</p>

<dl>
<dt>Bugfixes:</dt>
<dd><ul>
    <li>Fixed a problem with XML-RPC implementation when running in
        presence of unexpected (not 1.2) version of Apache XML-RPC
        library.</li>
    <li><code>jsamp.xmlrpc.impl</code> property now correctly propagated
        to JVM running external hub.</li>
    <li>Race condition in unit tests which sometimes gave false 
        failures is fixed.</li>
    <li>Fixed threading problem in <code>hubmonitor</code> which meant that
        sometimes window did not appear.</li>
    <li>Some other minor items.</li>
    </ul>
    </dd>
</dl>
</subsection>

<subsection name="Version 0.3">
<p>
<strong>Date:</strong> 9 Dec 2008<br/>
</p>

<dl>
<dt>Major New Features:</dt>
<dd><ul>
    <li>There is now an option for both hub and client GUI to keep track
        of and display messages which have been sent.
        HubRunner and HubMonitor GUIs by default now have tabs
        showing messages sent/received and their current status -
        see <a href="gui.html">GUI Features</a> section for some
        screenshots.
        To see this in action, start the <code>HubRunner</code> in
        (default) <code>msg-gui</code> mode and then run 
        <code>HubTester</code>.  Or just use the hub with your own
        SAMP clients.
        Note that this functionality incurs some overhead - if not used
        no such overhead is incurred.
        </li>
    <li>A new small GUI component is available which just shows the icons for
        all registered clients (like what used to appear in the bottom right
        corner of VODesktop windows).
        </li>
    <li>Facilities have been added for full logging of all XML or RPC 
        communications in the hub or clients.
        See new <code>xml-log</code> and <code>rpc-log</code> options
        to <code>-xmlrpc</code> flags of command-line tools, and classes
        <code>org.astrogrid.samp.xmlrpc.internal.*LoggingInternal*</code>.
        </li>
    <li>Replace <code>DefaultSendActionManager</code> with other,
        more capable, <code>SendActionManager</code> subclasses.
        This makes it easy to handle the results from messages which 
        have been sent, for instance by passing the information to the
        user graphically or in other ways.
        </li>
    <li>HubMonitor tool can now subscribe to messages other than 
        administrative ones, like Snooper.
        </li>
    <li>MessageSender tool now pretty-prints response(s).
        </li>
    </ul>
    </dd>

<dt>Backwards Compatibility:</dt>
<dd>There have been a number of changes since release 0.2 which are 
    backwardly incompatible, so that source code using earlier versions
    of JSAMP will need to be adjusted.  GUI-related functionality is
    most affected.  This is because I'm still 
    designing it, and some changes were required to accommodate new
    features etc; sorry. I hope that there will be fewer backwardly 
    incompatible changes in the future as the library matures - but I'm
    not offering any guarantees just yet.
    Some of the more obvious changes are as follows:
    <ul>
    <li>New class <code>gui.GuiHubConnector</code> now contains the
        Swing-related functionality which was previously in 
        (its superclass) <code>client.HubConnector</code>, and also
        all the functionality from the now removed class
        <code>gui.ConnectorGui</code>.
        </li>
    <li><code>HubRunner</code> and <code>ConnectorGui</code> APIs modified 
        to permit use of various different hub implementations
        (with different graphical characteristics -
        see <code>HubMode</code>).
        </li>
    </ul> 
    If there are things which used to work in a previous version and you
    can't see how to do it now, please contact me and I'll advise how
    to update.
    </dd>

<dt>Bugfixes:</dt>
<dd><ul>
    <li>Fixed server error which sometimes resulted in failed reads,
        especially for long messages.</li>
    <li>Fixed error in handling CalcStorm <code>-xmlrpc</code> flag.</li>
    </ul>
    </dd>

<dt>Other:</dt>
<dd><ul>
    <li>Change return values of <code>callAll</code> and
        <code>notifyAll</code> hub methods as per agreed modifications to 
        the standard at version 1.1.  
        Affects hub and client API, implementation and test suite.</li>
    <li>Default XML-RPC implementation is now Internal rather than
        Apache.</li>
    <li>HubConnector now subscribes to <code>samp.hub.disconnect</code>
        MType.</li>
    <li>Improved performance of internal client when sending long 
        messages.</li>
    <li>Add <code>SampUtils.isSampChar()</code> convenience method.</li>
    <li>Add public <code>createTag</code> method to 
        <code>HubConnector</code>.</li>
    <li>Added test for long messages in HubTester.</li>
    <li>HubTester now tests nearly all legal SAMP 
        <code>string</code> characters.</li>
    <li>...And some other things not mentioned here.</li>
    </ul>
    </dd>
</dl>
</subsection>

<subsection name="Version 0.3-1">
<p>
<strong>Date:</strong> 27 Mar 2009<br/>
</p>

<dl>
<dt>Minor Enhancements:</dt>
<dd><ul>
    <li>Add <code>GuiHubConnector.createRegisterOrHubAction</code> method,
        which registers if it can, else offers the user to start a hub.
        This may be the only button you need.
        </li>
    <li>Internal HTTP server now tolerates LF as well as the correct CRLF as
        HTTP request header line terminators, as recommended by HTTP 1.1 
        (RFC2616).
        </li>
    <li>Add convenience methods <code>call</code> and <code>callAll</code>
        to <code>HubConnector</code> - these allow you to make asynchronous 
        calls so that the results are delivered as callbacks to 
        supplied objects without having to worry about registering
        handlers and matching tags.
        </li>
    <li>Add <code>createTargetSelector</code>/<code>createTargetAction</code>
        methods to <code>SendActionManager</code> class.
        These give another way (button plus combo box) go allow users 
        to trigger a send.
        </li>
    <li>Add comment to <code>.samp</code> lockfile noting that contact XML-RPC
        URL hostname is configurable.
        </li>
    <li>Cache home directory when first determined in <code>SampUtil</code>.
        </li>
    </ul>
    </dd>
<dt>Backward Compatibility:</dt>
<dd><ul>
    <li>Moved HTTP server implementation used by internal XML-RPC 
        implementation into its own package, <code>samp.httpd</code>.
        Also added some utility classes in that package to facilitate
        serving dynamic resources and resources from the classpath. 
        This is because having a simple self-contained HTTP server 
        may be useful for client implementations doing SAMP-like things 
        other than strictly communicating with the hub.
        </li>
    <li><code>ResultHandler</code> and <code>LogResultHandler</code> classes
        moved from package <code>gui</code> to <code>client</code>.
        </li>
    <li>Changed SAMP protocol version to 1.11.
        </li>
    </ul>
    </dd>
<dt>Bug Fixes:</dt>
<dd><ul>
    <li>Fixed hub lockfile location bug for Windows at Java 1.4.
        </li>
    <li>Fix process handling bug which caused Windows XP external hub start
        to write incomplete lock file.
        </li>
    </ul>
    </dd>
</dl>

</subsection>

<subsection name="Version 1.0">
<p>
<strong>Date:</strong> 5 Aug 2009<br/>
</p>

<p>Though this version is numbered 1.0, it's not a giant leap ahead
of the previous one (0.3-1).  However, this is the first release 
since SAMP became an IVOA Recommendation,
and this toolkit is believed to be fully compliant with that standard.
The intention is that backwardly incompatible changes will be kept
to a minimum following this release.
</p>

<p>New functionality:
</p>
<ul>
<li>New <a href="bridge.html">Bridge</a> client added.
    This is a significant bit of infrastructure which allows clients
    on different hubs to interoperate.
    </li>
<li>Added popup menus to GUI hub views which allow you to ping or 
    forcibly disconnect registered clients.
    </li>
<li>System property <code>jsamp.server.port</code> provided to
    allow selection of the default server port.
    </li>
<li>System property <code>jsamp.lockfile</code> provided to support 
    non-standard lockfile location.
    </li>
<li>HubConnector now subscribes by default to new 
    <tt>client.env.get</tt> MType.
    </li>
<li>Added <code>-clientname</code> and <code>-clientmeta</code> flags to
    <code>Snooper</code> command-line tool.
    </li>
<li>You can now set the <code>samp.secret</code> string for 
    HubRunner if you don't want it chosen randomly.
    </li>
<li>Add some more documentation pages:
    <a href="sysprops.html">System Properties</a>,
    <a href="debug.html">Debugging Aids</a>
    and
    <a href="bridge.html">Bridge</a>.
    </li>
<li>The help message now reports relevant system properties as well as
    other help info.
    </li>
</ul>

<p>Changes to behaviour 
(note some of these may have backward compatibility issues):
</p>
<ul>
<li>The default hostname for HTTP server etc 
    (<code>SampUtils.getLocalHost()</code>)
    is now "127.0.0.1", not the DNS name; in certain network environments this
    works better than the alternatives, though it's less good for
    inter-machine communications.
    This default can be altered by setting the <code>samp.hostname</code> 
    system property; it has two new special values "[hostname]" and 
    "[hostnumber]".
    </li>
<li>Icon URLs declared by test clients etc now use internal server references
    rather than links to external static resources.  This means icons
    are not dependent on network availability.
    </li>
<li>Clients forcibly disconnected by <tt>samp.hub.disconnect</tt> now 
    don't try to re-autoconnect themselves.
    </li>
<li>Remove warning if permission change on .samp file to owner-only read fails.
    This permission change is probably not possible on Windows-like OSes
    (unless anyone can tell me different), 
    and the warning causes confusion.</li>
<li>System property <code>samp.localhost</code> renamed to
    <code>jsamp.localhost</code> 
    (the old name is still recognised for backward compatibility).
    </li>
<li>Withdraw <code>-xmlrpc</code> flag from command-line tools;
    the <code>jsamp.xmlrpc.impl</code> system property should be used
    instead.
    </li>
<li>Standard version is now reported as v1.11 REC 2009-04-21.
    </li>
</ul>

<p>API Changes
(note some of these may have backward compatibility issues):
</p>
<ul>
<li>Added <code>DefaultClientProfile</code> class;
    this is now the recommended way of getting a general purpose ClientProfile
    object (rather than using <code>StandardClientProfile.getInstance()</code>.
    Using this will aid pluggability (ability to use with non-standard
    profiles in the future).
    </li>
<li>Added <code>UtilServer</code> class; this can help to reduce the number 
    of HTTP servers run by a JSAMP application, 
    and provides convenience methods for exporting 
    local (e.g. file: or classpath) URLs.
    </li>
<li>Added <tt>getHubClient</tt> and <tt>disconnect</tt> methods to 
    BasicHubService; you can now use the hub object to forcibly
    disconnect clients.
    </li>
<li><tt>StandardClientProfile</tt> now has overridable <tt>getLockInfo</tt>
    method for better customisability.
    </li>
<li>Added <code>parseValue</code> utility method to <code>SampUtils</code>
    class.
    </li>
<li>Added new method <code>HubConnector.connectionChanged</code>.
    </li>
<li>InternalServerFactory now returns a server which can be safely 
    reused.
    </li>
<li>Class <code>LockInfo</code> moved from <code>org.astrogrid.samp</code>
    package to <code>org.astrogrid.samp.xmlrpc</code>,
    which is where it should have been.
    </li>
</ul>

<p>Bugfixes:
</p>
<ul>
<li>Missing <code>jsamp.version</code> file now included in source 
    zip archive.</li>
<li>Fixed error reporting bug in <code>messagesender</code> tool.</li>
</ul>

</subsection>

<subsection name="Version 1.1">
<p>
<strong>Date:</strong> 21 Jul 2010<br/>
</p>

<p>Protocol extension:</p>
<ul>
<li>The environment variable SAMP_HUB can now be used to specify a
    non-default lockfile location for clients and hub to use with the
    Standard Profile.  This usage is expected to be part of the next
    version of the SAMP standard (SAMP 1.2, in WD at time of writing).
    See the documentation for the 
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/xmlrpc/StandardClientProfile.html"
                                              >StandardClientProfile</a>
    class for details, and 
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/client/DefaultClientProfile.html"
                                              >DefaultClientProfile</a>
    for a JSAMP-specific extension to this mechanism.
    The non-standard 
    <code>jsamp.lockfile</code> and <code>jsamp.profile</code>
    system properties which did the same job in a non-standard way
    have been withdrawn.
    This has some backwardly incompatible consequences:
    <ul>
    <li><code>jsamp.lockfile</code> and <code>jsamp.profile</code>
        system properties withdrawn;
        use <code>SAMP_HUB</code> environment variable instead.
        </li>
    <li><code>SampUtils.LOCKFILE_NAME</code> constant withdrawn;
        use <code>StandardClientProfile.LOCKFILE_NAME</code> instead.
        </li>
    <li><code>SampUtils.getLockFile()</code> method withdrawn;
        use <code>StandardClientProfile.getLockUrl()</code> instead.
        If you want to find out if a hub is running, instead of
        <code>SampUtils.getLockFile().exists()</code>, use
        <code>DefaultClientProfile.getProfile().isHubRunning()</code>.
        </li>
    <li><code>LockInfo.readLockFile(File)</code> method withdrawn;
        use <code>LockInfo.readLockFile(URL)</code> instead.
        </li>
    <li><code>LockInfo.readLockFile()</code> method withdrawn;
        use <code>StandardClientProfile.getLockInfo()</code> instead.
        </li>
    <li><code>LockWriter</code> no-arg constructor withdrawn.
        </li>
    </ul>
</li>
</ul>
<p>Enhancements:</p>
<ul>
<li>Where possible, if the hub is running in GUI mode it will now install
    itself as an icon in the "system tray" rather than posting the 
    window directly; a popup menu associated with the tray icon allows
    window display and hub shutdown.  If the platform does not provide
    system tray functionality, it will revert to the previous behaviour of
    posting the window directly.
    System tray functionality is available only when running under
    Java 1.6 or later, and only when using a suitable display manager.</li>
<li>Added <code>-httplock</code> flag to hubrunner, which allows publication
    of lockfile by HTTP for use by non-localhost clients.</li>
</ul>
<p>Usability:</p>
<ul>
<li>Invoking JSamp class (e.g. "<code>java -jar jsamp.jar</code>")
    with no arguments
    now starts the hub rather than just printing a usage message.</li>
<li>ClientProfile interface has new method <code>isHubRunning</code>.
    This is more general (and easier to use) than testing something like
    <code>StandardClientProfile.getLockFile().exists()</code>.</li>
<li><code>HubRunnner.runHub</code> method now returns the running 
    HubRunner instance.</li>
</ul>
<p>Bugfixes:</p>
<ul>
<li>Fix error in XML-RPC fault responses
    (<code>faultCode</code> was string instead of int).</li>
<li>Fix the MessageTracker hub so it doesn't get confused if clients re-use
    the same tag for different messages.</li>
<li>Adjusted logic of client tracking in HubConnector to be more robust.</li>
<li>Fix bug in outgoing message tooltips for MessageTracker message box.</li>
<li>Fix concurrency issue in HttpServer.</li>
<li>Fix issue which could cause GUI freeze while waiting for
    remote icons to load.</li>
<li>Catch security exceptions when calling <code>addShutdownHook</code> in
    XmlRpcHubConnection.  It seems that signed applets may not have the 
    appropiate permissions.</li>
</ul>
<p>Minor improvements:</p>
<ul>
<li>Command-line tools now use <code>DefaultClientProfile.getProfile()</code>
    rather than <code>StandardClientProfile.getInstance()</code> as they should
    (hence will be correctly influenced by <code>SAMP_HUB</code>
    environment variable).</li>
<li>More tests added to HubTester for correctness of XML-RPC responses.</li>
<li>Be more frugal with DocumentBuilderFactory instances to reduce some
    unwanted logging.</li>
<li>Improve wait implementation in HubTester to avoid non-yield
    race conditions.</li>
<li>A warning is now issued if <code>getClientMap</code> is called
    before <code>declareSubscriptions</code> on a <code>HubConnector</code>,
    since without declaring subscriptions the client map won't work.</li>
</ul>
</subsection>

<subsection name="Version 1.2">
<p>
<strong>Date:</strong> 15 Feb 2011<br/>
</p>

<p>The two main changes at this release are generalisation of the
hub running framework to allow multiple profiles to run interfacing to
the same hub simultaneously, and implementation of the experimental
Web Profile.  The former was motivated by the latter (though should really
have been present from the start).  This work was suggested by 
Jonathan Fay and financially supported by Microsoft Research,
whose support is gratefully acknowledged.  There are also
a number of bug fixes and minor enhancements.
</p>

<p>Hub framework:</p>
<blockquote>
<p>The <code>org.astrogrid.samp.hub.HubRunner</code>
class has been deprecated in favour of the new class
<a target="samp-javadocs"
   href="apidocs/org/astrogrid/samp/hub/Hub.html"
                >org.astrogrid.samp.hub.Hub</a>.
This can be used from the command line or programmatically to start a hub,
and it can run zero or more profiles, defined by the new
<a target="samp-javadocs"
   href="apidocs/org/astrogrid/samp/hub/HubProfile.html">HubProfile</a>
interface, simultaneously.  HubProfile implementations are provided for
the Standard Profile and the Web Profile, and you can plug in your own
at runtime.  This class is now the Main-Class defined in the jar file's
Manifest, so invoking (e.g. clicking or java -jar) the jsamp-*.jar file
will now invoke this class.  Documentation of the command-line usage
is on the <a href="commands.html#Hub">Command-line Tools</a> page.
By default only the Standard Profile is run, so simply invoking the
jar file will have much the same behaviour as it did in previous 
versions, that is starting a Standard Profile-only hub.
Which profiles are run can be influenced in various ways,
including by defining the
<a href="sysprops.html#jsamp_hub_profiles"><code>jsamp.hub.profiles</code></a>
system property.
</p>
<p>A new "facade" mode of hub operation has been introduced, which 
allows tunnelling from one hub profile to another (mostly of interest
to hub profile implementors).
</p>
<p>There have been a number of other backwardly incompatible changes to
the hub implementation classes:
Most of the <code>HubService</code> interface has been replaced using
<code>HubConnection</code> and <code>Receiver</code> has been replaced with
<code>CallableClient</code>, reducing amount and duplication of code,
and some assumptions specific to the Standard Profile have been
removed from the interfaces of hub classes which are properly 
profile-independent.
These changes are not believed likely to affect
anybody who is not writing hub implementation code.
</p>
</blockquote>

<p>Web Profile:</p>
<blockquote>
<p>This release also includes client and hub implementations of the
experimental Web Profile.
Implementation is in the new package
<a target="samp-javadoc"
   href="apidocs/org/astrogrid/samp/web/package-summary.html"
                >org.astrogrid.samp.web</a>.
Note that this profile is still under discussion and details of the
definition may change in the future.
</p>
</blockquote>

<p>Bug fixes:</p>
<ul>
<li>Fixed URI escaping bugs related to "+" characters
    (new utility methods <code>SampUtils.uriEncode/Decode</code>).</li>
<li>Fixed some concurrency bugs to do with handler lists in
    <code>HubConnector</code>, <code>HttpServer</code>,
    <code>InternalServer</code> and <code>ApacheServer</code>
    (thanks to Laurent Bourg&#xe8;s).</li>
<li>Fixed, I think, threading issues that occasionally prevented hub
    forced shutdown notifications getting to some clients.
    It is possible this fix will have knock-on performance or other effects,
    especially in the presence of badly-behaved clients -
    please report if you notice problems.
    Thanks (again) to Laurent Borg&#xe8;s for extensive help with this.</li>
<li>Fixed a bug related to output capture when an external hub is started.</li>
<li>Fixed some not-quite-correct internal HTTP server error responses
    (405, 400).</li>
<li>Fixed internal HTTP server so it won't reorder request/response
    headers.</li>
<li>Improved header handling (case-sensitive, duplicated keys)
    in HttpServer.</li>
<li>Fixed client XML logging bug.</li>
</ul>

<p>Minor changes and enhancements:</p>
<ul>
<li>Changed pluggable XML-RPC implementation framework API slightly -
    <code>handleCall</code> method in <code>SampXmlRpcHandler</code>
    interface gets an additional argument.</li>
<li>SAMP Version now declares itself as SAMP v1.2 REC.</li>
<li>Some additional system properties are now propagated when starting an
    external hub.</li>
<li>Window positioning now follows platform norms by default rather than the
    java policy of placement at (0,0).  
    Specifically: the <code>java.awt.Window.locationByPlatform</code>
    system property is set, if it does not already have an explicit value,
    in the JSamp class.</li>
<li>AbstractMessageHandler has a new method <code>createResponse</code>
    which may be overridden for more flexibility.</li>
<li>External hub start action is disabled in JNLP context, since
    it won't work.</li>
</ul>
</subsection>

<subsection name="Version 1.3">
<p>
<strong>Date:</strong> 2 Aug 2011<br/>
</p>

<p>Various changes relating to configurable use of profiles and the
Web Profile in particular, to match the SAMP 1.3 WD,
and to enable experimentation with multi-profile configurations while
we gain experience with security options.
There is more discussion in the new <a href="profiles.html">Profiles</a> page, 
but the main changes are:
</p>
<ul>
<li>The Web Profile is now available, but not switched on, by default.
    The Web Profile (and other profiles) can be switched on or off while
    the hub is running by using the new <b>Profiles</b> menu in the
    hub window or system tray icon.
    There is a corresponding new <code>hub</code> command flag
    <code>-web:extraprofiles</code> and system property
    <code>jsamp.hub.profiles.extra</code>.
    </li>
<li>The Profiles menu also has a <b>Web Profile Configuration</b> submenu,
    which allows fine control over the way the Web Profile is run.
    This is to permit experimentation with security options;
    this menu or some of its options may be withdrawn in future versions.
    There are corresponding flags for the <code>hub</code> command:
    <code>-web:[no]cors</code>,
    <code>-web:[no]flash</code>,
    <code>-web:[no]silverlight</code>,
    <code>-web:[no]urlcontrol</code>.
    </li>
<li>The Web Profile hub server now blocks non-localhost requests at
    the HTTP level.  This should benefit security.
    </li>
<li>The Web Profile URL translation service now by default blocks access to
    sensitive resources (local filesystem and localhost URLs) if they
    have not previously been mentioned by a non-Web Profile client.
    This should benefit security.
    </li>
<li>Web profile now uses a <code>map</code> argument and not a
    <code>string</code> argument to <code>register()</code>,
    as per the change to the Web Profile specification.
    </li>
<li>Various related changes to the hub implementation and API have been
    made to enable the above.
    The recommended entry point, <code>Hub.runHub()</code>, still works though.
    </li>
</ul>

<p>The Hub GUI window now has menus:
</p>
<ul>
<li><b>File</b> menu, which just allows hub shutdown.</li>
<li><b>Clients</b> menu, which allows pinging and disconnection of clients
    (this functionality duplicates the existing, but not very obvious,
    client popup menu).</li>
<li><b>Profiles</b> menu, as described above.</li>
</ul>

<p>JSON is now used as the standard serialization/deserialization format
for SAMP objects in a few places:
</p>
<ul>
<li>New utility methods <code>toJson</code> and <code>fromJson</code> in
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/SampUtils.html"
                                       >SampUtils</a> class.
    </li>
<li>Non-scalar message parameter contents and client metadata
    can now be specified to 
    the <code>messagesender</code> and <code>snooper</code> tools
    on the command line using JSON syntax.
    </li>
<li>Message display, e.g. in the hub message tracker GUI, are now
    shown in JSON format.
    In practice this means you'll see a few more double quotes - it
    also means they can be cut and pasted directly into other JSON-aware
    contexts.
    </li>
</ul>
<p>Other items:
</p>
<ul>
<li>The <code>ClientProfile.isHubRunning</code> method now probes more
    agressively for a hub (for instance in the Standard Profile it pings
    rather than just looking for the .samp file).
    This is a change to both the API and the implementations.</li>
<li>The Web Profile registration dialogue is now somewhat internationalised.
    Thanks to Luigi Paioro and Markus Demleitner for providing
    translations.  This can be extended by providing further instances of
    <a target="samp-javadoc"
       href="apidocs/org/astrogrid/samp/web/AuthResourceBundle.html"
                                           >AuthResourceBundle</a>
    class or supplying a suitable
    <code>org.astrogrid.samp.web.AuthResourceBundle_xx.properties</code>
    resource; run AuthResourceBundle.main() for example output.</li>
<li>The Web Profile hub now fails at start time rather than during
    registration attempts if Swing client authorization is in use
    with headless graphics.</li>
<li>More helpful warning message when standard profile lockfile
    is present but broken (suggests deleting file).</li>
<li><code>HubMonitor</code> now correctly uses
    <code>DefaultClientProfile</code> rather than
    <code>StandardClientProfile</code>.</li>
</ul>
</subsection>

<subsection name="Version 1.3-1">
<p>
<strong>Date:</strong> 26 Oct 2011<br/>
</p>

<ul>
<li>Hub now runs with Web Profile on by default.</li>
<li>Web Profile has a new configuration option, which restricts permitted
    MTypes that a Web Profile client can send.  This is switched on
    by default.</li>
<li>Tone down warning in the Web SAMP confirmation dialogue slightly
    to reflect improved security measures in default Web Profile
    configuration.</li>
<li>The <code>messagesender</code> command-line tool has new flags
    <code>-targetname</code> and <code>-targetid</code> which replace the
    previous <code>-target</code> flag.</li>
<li>Add French translation for Web SAMP confirmation dialogue
    (thanks to Thomas Boch).</li>
<li>URL encode argument of <code>ResourceHandler.addResource</code>
    (thanks to Omar Laurino).</li>
<li>Add <code>-web:auth extreme</code> mode to hub.</li>
<li>Web hub profile now throws
    <code>SampException</code> not <code>SecurityException</code>
    on registration failure; this makes failures less verbose in the hub.</li>
</ul>
</subsection>

<subsection name="Version 1.3-2">
<p>
<strong>Date:</strong> 12 Dec 2011 <br/>
</p>

<ul>
<li>Remove some code which was not compatible with J2S1.4.</li>
<li>Web Profile URL control now controls all URLs not just local ones.
    All maps passing through the hub connection are now scanned for URLs.</li>
<li>Reduce logging for message send failures, partly by reducing failures
    themselves.</li>
<li>Hub implements <code>x-samp.query.by-meta</code> MType.</li>
<li>New methods on <code>Hub</code> class to determine whether the hub
    is running and with what profiles.</li>
<li>Added <code>-subs</code> flag to Snooper tool.</li>
<li>Fixed bug in JSON parser
    (wouldn't recognise empty objects "<code>{}</code>").</li>
<li>The implementation of MType restrictions for Web Profile clients
    has been changed.  Blocked MTypes are now completely hidden from
    Web Profile clients.  There is still a list of blocked MTypes
    (ones with known harmless semantics), but subscribing clients may
    override this, i.e. note MTypes that they subscribe to as
    known to be either harmless or harmful by annotating the subscription
    (populating the map value corresponding to the MType key)
    with a key "<code>x-samp.mostly-harmless</code>" and a value of
    "1" (harmless) or "0" (harmful).</li>
<li>The Web Profile registration dialogue now reports the apparent URL of
    the registering client (as determined from the Referer header)
    if available.</li>
</ul>
</subsection>

<subsection name="Version 1.3-3">
<p>
<strong>Date:</strong> 30 Oct 2012<br/>
</p>

<ul>
<li>Failure to start some profiles no longer prevents the hub from starting
    up at all.  This means that default configuration (Standard + Web profile) 
    hub startup no longer fails on a machine that already has a web profile
    hub running on it.</li>
<li>Reported standard version is now 1.3 REC.</li>
<li>Fixed some broken command-line hub options
    (<tt>-[no]restrictmtypes</tt> and <tt>-[no]urlcontrol</tt>).</li>
<li>Command line <code>-web:*</code> and <code>-std:*</code> flags are now
    used even when <code>-profiles</code> flag is not supplied explicitly
    (where possible).</li>
<li>Added <code>Hub.getRunningHubs</code> static method to locate hubs
    running in current JVM, as requested by JMMC.</li>
<li>Added <code>Hub.getWindow()</code> method, as requested by JMMC.</li>
<li>Improved shutdown sequence, shutting down clients first and then hubs,
    following contribution from JMMC.</li>
<li>Plugged several resource leaks
    (cancel auxiliary threads in HubConnector on <code>setActive(false)</code>,
    free XML-RPC servers associated with callable clients on unregister)
    following contribution from JMMC.</li>
<li>The distributed jar file is now <em>signed</em> with a Thawte 
    code-signing certificate (owned by the University of Bristol).
    This means that you can provide a JNLP file to start a hub using
    WebStart which will not complain to the user about not being able
    to authenticate the publisher's identity.</li>
</ul>
</subsection>

<subsection name="Version 1.3-4">
<p>
<strong>Date:</strong> 9 Oct 2013<br/>
</p>

<ul>
<li>JSAMP has been rehosted, and no longer lives on AstroGrid sites.
    The distribution web site is now at
    <a href="http://www.star.bristol.ac.uk/~mbt/jsamp/"
            >http://www.star.bristol.ac.uk/~mbt/jsamp/</a>,
    and the source can be found on github at
    <a href="https://github.com/mbtaylor/jsamp"
            >https://github.com/mbtaylor/jsamp</a>.</li>
<li>Fixed the Web Profile hub to work with HTTPS-based web pages as
    well as HTTP-based ones; previously HTTPS pages were blocked for
    no good reason(?).
    Developers of applications which may run the JSAMP hub are encouraged
    to upgrade to this version to avoid penalising use of HTTPS in
    third-party SAMP web applications.
    <em>Note added later: the HTTPS problem is not so easily solved.</em></li>
<li>Add new system property <code>jsamp.web.extrahosts</code> to allow
    trusted non-local hosts to register with the Web Profile
    (for instance near-local mobile devices).</li>
<li>Improve shutdown behaviour somewhat, now less prone to fail to
    delete <code>.samp</code> file in JNLP shutdown.</li>
<li>The jar file is now distributed in both signed and unsigned forms.</li>
</ul>
</subsection>

<subsection name="Version 1.3.5">
<p>
<strong>Date:</strong> 13 Nov 2014<br/>
</p>

<ul>
<li>The build is now done using Maven 3.
    Thanks to Paul Harrison for doing most of the work on this.
    As a consequence, the version numbering system has changed - it's now
    a.b.c instead of a.b-c.
    Note although the POM file is updated etc, the release is not
    currently deploying to a central maven repository; I haven't worked out
    how to do that yet.  If somebody out there is keen to see that happen
    and wants to help me out, get in touch.</li>
<li>The jar file now contains "Permissions" and "Application-Name" attributes,
    which are required when running the hub as a signed jar under
    WebStart at java 7u51+.</li>
<li>The Web Profile security dialogue has been adjusted so that long strings
    transmitted as application Name, Origin or URL do not extend the width
    of the popup window indefinitely.</li>
<li>Updated Standard Profile <code>samp.profile.version</code> value to 1.3.
    By an oversight it had got stuck at 1.11.</li>
<li>The hub now completes client calls without waiting for HTTP responses.
    (<code>XmlRpcCallableClient</code> implementation uses
     <code>callAndForget</code> instead of <code>callAndWait</code>).
    This prevents some cases of calls hanging in the presence of
    badly-behaved clients.  Some other bugfixes related to hub shutdown
    were required to prevent this causing knock-on problems.</li>
<li>Work round a JNLP shutdown classloading bug.</li>
<li>One or two minor bugfixes.</li>
</ul>
</subsection>

<subsection name="Version 1.3.6">
<p>
<strong>Date:</strong> 19 Sep 2019<br/>
</p>

<ul>
<li>New command <a href="commands.html#SampLoad">SampLoad</a>,
    intended for use as browser helper application.</li>
<li>Deprecate <code>UtilServer.exportResource(String)</code> in favour of
    <code>exportResource(URL)</code>, on the grounds that it's easy to
    end up using the wrong classloader.</li>
<li>Fix a javadoc error in <code>SelectiveClientListModel</code>.</li>
<li>Fix a bug in <code>SendActionManager</code>
    that meant the targeted send action didn't do anything.</li>
<li>Add <code>HubConnector.isActive</code> method.</li>
<li>Downgrade internal HTTP server 404 logging messages from WARNING
    to INFO, so they are generally no longer visible to users.</li>
<li>Fix <code>SampUtil.fileToUrl</code> to cope with non-URL-safe
    characters in filenames (UTF-8 encoding is used).</li>
<li>Various changes to the code to facilitate implementation of the
    (experimental, not included here) TLS profile.  These mostly
    involve publicising previously private methods, but there are a
    few changes to the client authorization for the Web Profile,
    including a backwardly-incompatible change to signature of
    the <code>web.ClientAuthorizer.authorize</code> method.
    Library users are not expected to notice these changes.</li>
</ul>
</subsection>

<subsection name="Version 1.3.7">
<p>
<strong>Date:</strong> 18 Nov 2019<br/>
</p>

<ul>
<li>Relax Origin restrictions in CORS web server
    to allow e.g. browser extensions.</li>
<li><code>jsamp.notray</code> system property introduced to prevent
    the hub appearing in the System Tray.</li>
</ul>
</subsection>

</section>

</body>
</document>
