|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
com.essbase.eas.framework.defs.command.DefaultCommandRequestor
public class DefaultCommandRequestor
Provides a default implementation of the CommandRequestor interface.
| Field Summary | |
|---|---|
static java.lang.String |
CLIENT_VERSION |
static java.lang.String |
ENCRYPTED |
static java.lang.String |
PASSWORD |
static int |
PORT_NUM_DEFAULT |
protected java.net.URL |
servletURLcontains the servlet URL this requestor object will route commands to. |
static java.lang.Integer |
SSL_PORT_NUM_DEFAULT |
static java.lang.String |
TRUE |
static java.lang.String |
USERNAME |
| Constructor Summary | |
|---|---|
protected |
DefaultCommandRequestor()creates a command requestor that has no servlet URL. |
|
DefaultCommandRequestor(java.lang.String server) |
|
DefaultCommandRequestor(java.lang.String server, boolean setSecure)creates a command requestor object using pointing to a specific server. |
|
DefaultCommandRequestor(java.lang.String server, boolean setSecure, boolean sslEnabled) |
|
DefaultCommandRequestor(java.net.URL url)creates a command requestor pointing at the given URL. |
| Method Summary | |
|---|---|
boolean |
canSecureMessages()Return whether secure transport is successfully configured |
void |
dispose() |
CommandString[] |
getCommandSet()retrieves the set of commands that this CommandRequestor object supports. |
int |
getDefaultPort()Get the default port for that a server would normally be found at. |
java.lang.Exception |
getException()When transport is not secure this will return the Exception that was the reason that transport can not be secure |
boolean |
getSecureAllMessages()Gets the secure all messages setting |
java.net.URL |
getServletURL()returns the servlet URL with which this CommandRequestor object is associated. |
java.lang.String |
login(java.lang.String user, java.lang.String password, java.lang.String clientVersion)Sree: The following method is provided so that an app outside EAS ca use this requestor class to talk to EAS server Prior to any valid request that is send out, we need to login. |
java.lang.String |
logout()Sree: The following method is provided to logout the session with EAS server. |
static java.net.URL |
parseURL(java.lang.String server, boolean setSecure) |
void |
resetCookie(java.lang.String server) |
java.io.InputStream |
sendCommand(java.lang.String command)sends a command to the servlet associated with this CommandRequestor object. |
java.io.InputStream |
sendCommand(java.lang.String command, boolean secure)sends a command to the servlet associated with this CommandRequestor object. |
java.io.InputStream |
sendCommand(java.lang.String command, java.util.Properties arguments)sends a command with a set of parameters to the servlet associated with this CommandRequestor object. |
java.io.InputStream |
sendCommand(java.lang.String command, java.util.Properties arguments, boolean secure)sends a command with a set of parameters to the servlet associated with this CommandRequestor object. |
java.io.InputStream |
sendCommand(java.lang.String command, java.util.Properties arguments, byte[] data)sends a command with arguments and an associated block of data to the servlet associated with this CommandRequestor object. |
java.io.InputStream |
sendCommand(java.lang.String command, java.util.Properties arguments, byte[] data, boolean secure)sends a command with arguments and an associated block of data to the servlet associated with this CommandRequestor object. |
java.io.InputStream |
sendCommand(java.lang.String command, java.util.Properties arguments, byte[] data, int offset, int len, boolean secure)sends a command with arguments and an associated block of data to the servlet associated with this CommandRequestor object. |
java.lang.String |
sendCommandGetString(java.lang.String command)sends a command to the servlet associated with this CommandRequestor object. |
java.lang.String |
sendCommandGetString(java.lang.String command, boolean secure)sends a command to the servlet associated with this CommandRequestor object. |
java.lang.String |
sendCommandGetString(java.lang.String command, java.util.Properties arguments)sends a command with a set of parameters to the servlet associated with this CommandRequestor object. |
java.lang.String |
sendCommandGetString(java.lang.String command, java.util.Properties arguments, boolean secure)sends a command with a set of parameters to the servlet associated with this CommandRequestor object. |
java.lang.String |
sendCommandGetString(java.lang.String command, java.util.Properties arguments, byte[] data)sends a command with arguments and an associated block of data to the servlet associated with this CommandRequestor object. |
java.lang.String |
sendCommandGetString(java.lang.String command, java.util.Properties arguments, byte[] data, boolean secure)sends a command with arguments and an associated block of data to the servlet associated with this CommandRequestor object. |
java.lang.String |
sendCommandGetString(java.lang.String command, java.util.Properties arguments, byte[] data, int offset, int len, boolean secure)sends a command with arguments and an associated block of data to the servlet associated with this CommandRequestor object. |
void |
setSecureAllMessages(boolean secure)Sets the transport to secure all commands sent by this CommandRequestor |
void |
setServletURL(java.net.URL value)sets the servlet URL with which this CommandRequestor object is associated. |
void |
setServletURL(java.net.URL value, boolean setSecure) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PORT_NUM_DEFAULT
public static final java.lang.Integer SSL_PORT_NUM_DEFAULT
public static final java.lang.String USERNAME
public static final java.lang.String PASSWORD
public static final java.lang.String ENCRYPTED
public static final java.lang.String TRUE
public static final java.lang.String CLIENT_VERSION
protected java.net.URL servletURL
| Constructor Detail |
|---|
protected DefaultCommandRequestor()
public DefaultCommandRequestor(java.lang.String server,
boolean setSecure)
throws java.net.MalformedURLException,
java.lang.NumberFormatException,
java.io.IOException
server - a string containing the machine name or machine name and port combination. The string must be in the form "machinename" or "machinename:port"; if the first form is used the port number is optained from the DefaultCommandRequestor.properties filejava.net.MalformedURLExceptionjava.lang.NumberFormatExceptionjava.io.IOException
public DefaultCommandRequestor(java.lang.String server,
boolean setSecure,
boolean sslEnabled)
throws java.net.MalformedURLException,
java.lang.NumberFormatException,
java.io.IOException
java.net.MalformedURLExceptionjava.lang.NumberFormatExceptionjava.io.IOException
public DefaultCommandRequestor(java.lang.String server)
throws java.net.MalformedURLException,
java.lang.NumberFormatException,
java.io.IOException
java.net.MalformedURLExceptionjava.lang.NumberFormatExceptionjava.io.IOException
public DefaultCommandRequestor(java.net.URL url)
throws java.lang.IllegalArgumentException,
java.io.IOException
url - the URL used to find the servlet.java.lang.IllegalArgumentException - if the url parameter is null.java.io.IOException| Method Detail |
|---|
public java.lang.String login(java.lang.String user,
java.lang.String password,
java.lang.String clientVersion)
throws java.lang.Exception
user -password -clientVersion -java.lang.Exception
public java.lang.String logout()
throws java.lang.Exception
java.lang.Exceptionpublic void resetCookie(java.lang.String server)
public java.net.URL getServletURL()
CommandRequestorCommandRequestor object is associated.getServletURL in interface CommandRequestor
public void setServletURL(java.net.URL value)
throws java.lang.IllegalArgumentException,
java.io.IOException
CommandRequestorCommandRequestor object is associated.setServletURL in interface CommandRequestorvalue - the URL to route this requestor's commands to.java.lang.IllegalArgumentException - if the parameter is null.java.io.IOException
public void setServletURL(java.net.URL value,
boolean setSecure)
throws java.lang.IllegalArgumentException,
java.io.IOException
java.lang.IllegalArgumentExceptionjava.io.IOExceptionpublic int getDefaultPort()
CommandRequestorgetDefaultPort in interface CommandRequestorpublic void setSecureAllMessages(boolean secure)
CommandRequestorCommandRequestorsetSecureAllMessages in interface CommandRequestorsecure - set to true to use secure transport for all commandspublic boolean getSecureAllMessages()
CommandRequestorgetSecureAllMessages in interface CommandRequestorpublic boolean canSecureMessages()
CommandRequestorcanSecureMessages in interface CommandRequestortrue if secure transport is configuredpublic java.lang.Exception getException()
CommandRequestorException that was the reason that transport can not be securegetException in interface CommandRequestorException that is the reason that transport is not secure
public java.io.InputStream sendCommand(java.lang.String command)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommand in interface CommandRequestorcommand - the command to routeInputStream object containing the results.java.io.IOException
public java.io.InputStream sendCommand(java.lang.String command,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommand in interface CommandRequestorcommand - the command to routesecure - set to true to secure the command and it's resultsInputStream object containing the results.java.io.IOException
public java.io.InputStream sendCommand(java.lang.String command,
java.util.Properties arguments)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommand in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.InputStream object containing the results.java.io.IOException
public java.io.InputStream sendCommand(java.lang.String command,
java.util.Properties arguments,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommand in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.secure - set to true to secure the command and it's resultsInputStream object containing the results.java.io.IOException
public java.io.InputStream sendCommand(java.lang.String command,
java.util.Properties arguments,
byte[] data)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommand in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.data - a byte array containing the supplemental information to send.InputStream object containing the results.java.io.IOException
public java.io.InputStream sendCommand(java.lang.String command,
java.util.Properties arguments,
byte[] data,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommand in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.data - a byte array containing the supplemental information to send.secure - set to true to secure the command and it's resultsInputStream object containing the results.java.io.IOException
public java.io.InputStream sendCommand(java.lang.String command,
java.util.Properties arguments,
byte[] data,
int offset,
int len,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommand in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.data - a byte array containing the supplemental information to send.offset - offset of the datalen - length of datasecure - set to true to secure the command and it's resultsInputStream object containing the results.java.io.IOException
public java.lang.String sendCommandGetString(java.lang.String command)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommandGetString in interface CommandRequestorcommand - the command to routeString object containing the results.java.io.IOException
public java.lang.String sendCommandGetString(java.lang.String command,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommandGetString in interface CommandRequestorcommand - the command to routesecure - set to true to secure the command and it's resultsString object containing the resultsjava.io.IOException
public java.lang.String sendCommandGetString(java.lang.String command,
java.util.Properties arguments)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommandGetString in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.String object containing the results.java.io.IOException
public java.lang.String sendCommandGetString(java.lang.String command,
java.util.Properties arguments,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommandGetString in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.secure - set to true to secure the command and it's resultsString object containing the results.java.io.IOException
public java.lang.String sendCommandGetString(java.lang.String command,
java.util.Properties arguments,
byte[] data)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommandGetString in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.data - a byte array containing the supplemental information to send.String object containing the results.java.io.IOException
public java.lang.String sendCommandGetString(java.lang.String command,
java.util.Properties arguments,
byte[] data,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommandGetString in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.data - a byte array containing the supplemental information to send.secure - set to true to secure the command and it's resultsString object containing the results.java.io.IOException
public java.lang.String sendCommandGetString(java.lang.String command,
java.util.Properties arguments,
byte[] data,
int offset,
int len,
boolean secure)
throws java.io.IOException
CommandRequestorCommandRequestor object.sendCommandGetString in interface CommandRequestorcommand - the command to routearguments - the map of argument names and values.data - a byte array containing the supplemental information to send.offset - buffer offsetlen - length of datasecure - set to true to secure the command and it's resultsString object containing the results.java.io.IOException
public static java.net.URL parseURL(java.lang.String server,
boolean setSecure)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic CommandString[] getCommandSet()
CommandRequestorCommandRequestor object supports. If an empty array is returned, then this CommandRequestor can be sent any command.getCommandSet in interface CommandRequestorCommandString objectspublic void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||