Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--

    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.

    The contents of this file are subject to the terms of either the GNU
    General Public License Version 2 only ("GPL") or the Common Development
    and Distribution License("CDDL") (collectively, the "License").  You
    may not use this file except in compliance with the License.  You can
    obtain a copy of the License at
    http://glassfish.java.net/public/CDDL+GPL_1_1.html
    or packager/legal/LICENSE.txt.  See the License for the specific
    language governing permissions and limitations under the License.

    When distributing the software, include this License Header Notice in each
    file and include the License file at packager/legal/LICENSE.txt.

    GPL Classpath Exception:
    Oracle designates this particular file as subject to the "Classpath"
    exception as provided by Oracle in the GPL Version 2 section of the License
    file that accompanied this code.

    Modifications:
    If applicable, add the following below the License Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyright [year] [name of copyright owner]"

    Contributor(s):
    If you wish your version of this file to be governed by only the CDDL or
    only the GPL Version 2, indicate your decision by adding "[Contributor]
    elects to include this software in this distribution under the [CDDL or GPL
    Version 2] license."  If you don't indicate a single choice of license, a
    recipient has the option to distribute your version of this file under
    either the CDDL, the GPL Version 2 or to extend the choice of license to
    its licensees as provided above.  However, if you add GPL Version 2 code
    and therefore, elected the GPL Version 2 license, then the option applies
    only if the new code is made subject to such option by the copyright
    holder.

-->
<html><head><title>Auction Sample</title></head>


<body>
<h1>Auction Sample</h1>

<p>This sample demonstrates how to develop more complex WebSocket applications.</p>
<p>The application is an auction server with 3 auctions running. Users may connect to any of the auction and bid for the item.
    The highest bid wins. Once first user enters the auction, the auction is started (time countdown starts at the predefined time).
    User can bid on the item. After each bid the auction timer is set to predefined time again. The auction finishes once
    the predefined time runs out.</p>

<h2>Contents</h2>
<p>The server side utilizes one endpoint - <code>org.glassfish.tyrus.sample.auction.AuctionEndpoint</code>, which handles the communication
    for all running auctions. The relative path of this endpoint is "/auction". The application demonstrates the usage of
    encoders and decoders, namely <code>org.glassfish.tyrus.sample.auction.encoders.AuctionMessageEncoder</code> and
    <code>org.glassfish.tyrus.sample.auction.decoders.AuctionMessageDecoder</code>.</p>


<h2>Running the Example</h2>
<p>Run the example as follows:
    deploy:
    <blockquote><code>$AS_MAIN/bin/asadmin start-domain</code></blockquote>
    <blockquote><code>$AS_MAIN/bin/asadmin deploy --force ./target/*war</code></blockquote>

<p>From a web browser, visit:</p>
<blockquote><code><a href="proxy.php?url=http%3A%2F%2Flocalhost%3A8080%2Fsample-auction">http://localhost:8080/sample-auction</a></code></blockquote>
</body>
</html>