com.guiseframework.platform.web
Class WebCommandMessage<C extends java.lang.Enum<C> & WebPlatformCommand>

java.lang.Object
  extended by com.guiseframework.platform.AbstractPlatformMessage
      extended by com.guiseframework.platform.web.AbstractWebMessage
          extended by com.guiseframework.platform.web.WebCommandMessage<C>
Type Parameters:
C - The type of command.
All Implemented Interfaces:
PlatformCommandMessage<C>, PlatformMessage, WebPlatformCommandMessage<C>, WebPlatformMessage

public class WebCommandMessage<C extends java.lang.Enum<C> & WebPlatformCommand>
extends AbstractWebMessage
implements WebPlatformCommandMessage<C>

A command message to or from the web platform.

Author:
Garret Wilson

Constructor Summary
WebCommandMessage(C command, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Command and parameters map constructor.
WebCommandMessage(C command, com.globalmentor.model.NameValuePair<java.lang.String,java.lang.Object>... parameters)
          Command and parameters constructor.
 
Method Summary
 C getCommand()
           
 java.util.Map<java.lang.String,java.lang.Object> getParameters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebCommandMessage

public WebCommandMessage(C command,
                         com.globalmentor.model.NameValuePair<java.lang.String,java.lang.Object>... parameters)
Command and parameters constructor.

Parameters:
command - The command.
parameters - The parameters of the command; parameters with duplicate names replace earlier parameters of the same name.
Throws:
java.lang.NullPointerException - if the given command and/or parameters is null.

WebCommandMessage

public WebCommandMessage(C command,
                         java.util.Map<java.lang.String,java.lang.Object> parameters)
Command and parameters map constructor.

Parameters:
command - The command.
parameters - The map representing the parameters of the command.
Throws:
java.lang.NullPointerException - if the given command and/or parameters is null.
Method Detail

getCommand

public C getCommand()
Specified by:
getCommand in interface PlatformCommandMessage<C extends java.lang.Enum<C> & WebPlatformCommand>
Returns:
The command.

getParameters

public java.util.Map<java.lang.String,java.lang.Object> getParameters()
Specified by:
getParameters in interface WebPlatformCommandMessage<C extends java.lang.Enum<C> & WebPlatformCommand>
Returns:
The read-only map of parameters, which will be encoded in JavaScript Object Notation (JSON).


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.