Changeset 21 for src/main/java


Ignore:
Timestamp:
10/06/20 13:12:31 (4 years ago)
Author:
bart
Message:

Fixes an issue with processing maxPower of a vote. Javadoc maven plugin now uses latest version.

Location:
src/main/java/geniusweb/partiesserver
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/geniusweb/partiesserver/Info.java

    r1 r21  
    2323
    2424        /**
    25          * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
    26          *      response). Returns
    27          *      <ul>
    28          *      <li>URL with websocket address to contact the now running agent.
    29          *      <li>SC_NOT_FOUND (404) if attempt is made to access non-running
    30          *     party.
    31          *      <li>SC_SERVICE_UNAVAILABLE (503) if there are no free slots to run
    32          *      the party.
    33          *      <li>SC_EXPECTATION_FAILED (417) if something else goes wrong during
    34          *      instantiating the party (then see logs for more details)
    35          *      </ul>
     25         * see
     26         * {@link HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)}.
     27         * Returns to the http caller
     28         * <ul>
     29         * <li>URL with websocket address to contact the now running agent.
     30         * <li>SC_NOT_FOUND (404) if attempt is made to access non-running party.
     31         * <li>SC_SERVICE_UNAVAILABLE (503) if there are no free slots to run the
     32         * party.
     33         * <li>SC_EXPECTATION_FAILED (417) if something else goes wrong during
     34         * instantiating the party (then see logs for more details)
     35         * </ul>
    3636         */
    3737        @Override
  • src/main/java/geniusweb/partiesserver/RunParty.java

    r8 r21  
    4343
    4444        /**
    45          * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
    46          *      response). Returns
    47          *      <ul>
    48          *      <li>URL with websocket address to contact the now running agent.
    49          *      <li>SC_NOT_FOUND (404) if attempt is made to access non-running
    50          *     party.
    51          *      <li>SC_SERVICE_UNAVAILABLE (503) if there are no free slots to run
    52          *      the party.
    53          *      <li>SC_EXPECTATION_FAILED (417) if something else goes wrong during
    54          *      instantiating the party (then see logs for more details)
    55          *      </ul>
     45         * See
     46         * {@link HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)}.
     47         * Returns
     48         * <ul>
     49         * <li>URL with websocket address to contact the now running agent.
     50         * <li>SC_NOT_FOUND (404) if attempt is made to access non-running party.
     51         * <li>SC_SERVICE_UNAVAILABLE (503) if there are no free slots to run the
     52         * party.
     53         * <li>SC_EXPECTATION_FAILED (417) if something else goes wrong during
     54         * instantiating the party (then see logs for more details)
     55         * </ul>
    5656         */
    5757        @Override
  • src/main/java/geniusweb/partiesserver/repository/AvailableParty.java

    r1 r21  
    1717         * @param name       the filename. This is not a {@link PartyId}.
    1818         * @param partyclass the class of the party.
    19          * @throws IllegalAccessException
    20          * @throws InstantiationException
     19         * @throws ClassNotFoundException if unknown partyclass
    2120         */
    2221        public AvailableParty(String name, Class<? extends Party> partyclass)
  • src/main/java/geniusweb/partiesserver/repository/RunningParty.java

    r18 r21  
    1010
    1111import geniusweb.actions.PartyId;
    12 import geniusweb.connection.DefaultConnection;
    1312import geniusweb.inform.Inform;
    1413import geniusweb.partiesserver.RunningPartiesUpdater;
     
    5251         * @param party the new party
    5352         * @param id    the new id for the party.
     53         * @param name  the name, this should match the filename
    5454         * @param start the start date for this party. Usually set to current time.
    5555         * @param end   the end date for this party
     
    7272
    7373        /**
    74          * Create instance from availableparty
    75          *
    7674         * @param availableparty the {@link AvailableParty}
    77          * @param name           the (file)name
    7875         * @param maxlifetimems  the maximum life time for this party (ms). The
    7976         *                       party will be killed and removed after this point.
     
    8178         *                       time plus the worst time to actual start up of the
    8279         *                       negotiation
    83          * @throws IllegalAccessException
    84          * @throws InstantiationException
     80         * @return a new RunningParty being an instance of availableparty
     81         * @throws IllegalAccessException if the class or its nullary constructor is
     82         *                                not accessible.
     83         *
     84         * @throws InstantiationException if this Class represents an abstract
     85         *                                class, an interface, an array class, a
     86         *                                primitive type, or void; or if the class
     87         *                                has no nullary constructor; or if the
     88         *                                instantiation fails for some other reason.
     89         *
    8590         */
    8691        public static RunningParty create(AvailableParty availableparty,
     
    104109         *                     {@link RunningPartiesUpdater} will keep an eye on the
    105110         *                     time and handle removal after time is up.
    106          *
    107          */
    108         public static RunningParty create(Party party, String name,
     111         * @return new RunningParty created from the Party instance.
     112         *
     113         */
     114        private static RunningParty create(Party party, String name,
    109115                        long maxRunTimeMS) {
    110116                if (maxRunTimeMS <= 0) {
     
    133139
    134140        /**
    135          * The name, this should match the filename in the repo (without the .jar).
    136          *
    137          * @return
     141         * @return The name, this should match the filename in the repo (without the
     142         *         .jar).
     143         *
    138144         */
    139145        public String getName() {
     
    207213
    208214        /**
    209          * You must have called {@link #connect(DefaultConnection)} before calling
     215         * You must have called {@link #withConnection(PartySocket)} before calling
    210216         * this.
    211217         *
    212          * @param info
     218         * @param info the {@link Inform} to be sent to the {@link #connection}
    213219         */
    214220        public void inform(Inform info) {
  • src/main/java/geniusweb/partiesserver/websocket/PartySocket.java

    r18 r21  
    1919import javax.websocket.server.ServerEndpoint;
    2020
    21 import com.fasterxml.jackson.core.JsonParseException;
    22 import com.fasterxml.jackson.databind.JsonMappingException;
    2321import com.fasterxml.jackson.databind.ObjectMapper;
    2422
     
    124122         *                      {@link Inform}
    125123         * @param session       the session. We already have this info.
     124         * @throws IOException if there is a socket/connection error, we can't parse
     125         *                     the received data, etc
    126126         */
    127127        @OnMessage
    128128        public void onMessage(String informmessage, Session session)
    129                         throws JsonParseException, JsonMappingException, IOException {
     129                        throws IOException {
    130130                if (this.session != session) {
    131131                        throw new IllegalStateException("Unexpected change of session ID");
Note: See TracChangeset for help on using the changeset viewer.