public class ServerAction extends AbstractAction
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
ServerAction() |
ServerAction(String name) |
ServerAction(String name,
Icon icon) |
ServerAction(String name,
String command) |
ServerAction(String name,
String command,
Icon icon) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent evt)
Invokes the server operation when the action has been invoked.
|
void |
addHeader(String name,
String value)
Adds a name value pair which represents a url connection request property.
|
void |
addParam(String name,
String value)
Adds a name value pair which represents a url parameter in an http
POST request.
|
Set<String> |
getHeaderNames()
Return a set of parameter names or null if there are no params
|
String |
getHeaderValue(String name)
Return a header value corresponding to name or null if it doesn't exist.
|
Set<String> |
getParamNames()
Return a set of parameter names or null if there are no params
|
String |
getParamValue(String name)
Return a parameter value corresponding to name or null if it doesn't exist.
|
String |
getURL() |
void |
setURL(String url)
Set the url for the action.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public ServerAction()
public ServerAction(String name)
public ServerAction(String name, String command)
name
- display name of the actioncommand
- the value of the action command keypublic void setURL(String url)
url
- a string representation of the urlpublic String getURL()
public void addParam(String name, String value)
public String getParamValue(String name)
public Set<String> getParamNames()
public void addHeader(String name, String value)
public String getHeaderValue(String name)
public Set<String> getHeaderNames()
public void actionPerformed(ActionEvent evt)
Copyright © 2013. All rights reserved.