All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.bristleback.server.bristle.actions.RemoteAction Maven / Gradle / Ivy

// Bristleback plugin - Copyright (c) 2010 bristleback.googlecode.com
// ---------------------------------------------------------------------------
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by the
// Free Software Foundation; either version 3 of the License, or (at your
// option) any later version.
// This library is distributed in the hope that it will be useful,
// but without any warranty; without even the implied warranty of merchantability
// or fitness for a particular purpose.
// You should have received a copy of the GNU Lesser General Public License along
// with this program; if not, see .
// ---------------------------------------------------------------------------
package pl.bristleback.server.bristle.actions;

import org.jwebsocket.api.WebSocketConnector;
import org.jwebsocket.token.Token;

/**
 * Classes implementing this interface are used to executing user actions.
 * Plugin will create one instance of every action class and bind all information into {@link RemoteActionInformation} object.
 * This interface determines only what operations will be made. To obtain fully implemented action class,
 * mark that class with {@link pl.bristleback.server.bristle.actions.AnnotatedRemoteAction} annotation.
 * Action class may contain Spring Framework dependencies, which will be bound at framework start.
 * To have Spring dependencies injected, mark bean setter with {@link pl.bristleback.server.bristle.integration.spring.BristleSpringBean} annotation.
 * For more detailed information about Spring support, please refer to {@link pl.bristleback.server.bristle.integration.spring.SpringIntegrationUtil} class documentation.
 *
 * @author Wojciech Niemiec
 * @see pl.bristleback.server.bristle.actions.AnnotatedRemoteAction AnnotatedRemoteAction
 */
public interface RemoteAction {

  /**
   * Performs action requested by user/connector.
   *
   * @param connector user requesting this action.
   * @param token     content of message, can be seen as action parameters.
   */
  void performAction(WebSocketConnector connector, Token token);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy