Class Message
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.clientcomm.Message
-
public class Message extends java.lang.Object
A Message represents a request from an Ignition client or designer. Each message has a message type, defined in GatewayConstants, and some named arguments.
-
-
Constructor Summary
Constructors Constructor Description Message()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArg(java.lang.String name, java.lang.String value)
void
addIndexedArg(java.lang.String name, java.lang.String value)
java.lang.String
getArg(java.lang.String name)
Returns the value of the named argument.int
getArgLength()
Returns the number of non-indexed arguments in this messagejava.lang.String
getCookie()
java.util.List<java.lang.String>
getIndexedArg(java.lang.String name)
Returns a list of strings representing all of the indexed arguments for the given name.java.lang.Integer
getIntArg(java.lang.String name)
Returns the named argument as an Integer.java.util.Locale
getLocale()
Retruns the locale of the calling clientjava.lang.Long
getLongArg(java.lang.String name)
Returns the named argument as a Long.int
getScope()
int
getType()
long
getVersion()
java.lang.String
getWrappedArg(java.lang.String name)
Like getArg, but returns empty string if the argument wasn't present.void
setCookie(java.lang.String cookie)
void
setLocaleCodes(java.lang.String[] localeCode)
Not part of the public API - used by the MessageParservoid
setScope(int scope)
void
setType(int i)
void
setVersion(long version)
-
-
-
Method Detail
-
getType
public int getType()
-
setType
public void setType(int i)
-
getVersion
public long getVersion()
-
setVersion
public void setVersion(long version)
-
getScope
public int getScope()
-
setScope
public void setScope(int scope)
-
addArg
public void addArg(java.lang.String name, java.lang.String value)
-
addIndexedArg
public void addIndexedArg(java.lang.String name, java.lang.String value)
-
getArgLength
public int getArgLength()
Returns the number of non-indexed arguments in this message
-
getArg
public java.lang.String getArg(java.lang.String name)
Returns the value of the named argument. If the argument isn't present, null is returned
-
getWrappedArg
public java.lang.String getWrappedArg(java.lang.String name)
Like getArg, but returns empty string if the argument wasn't present. Never returns null.
-
getLongArg
public java.lang.Long getLongArg(java.lang.String name)
Returns the named argument as a Long. Null is returned if the arg doesn't exist, or fails parsing
-
getIntArg
public java.lang.Integer getIntArg(java.lang.String name)
Returns the named argument as an Integer. Null is returned if the arg doesn't exist, or fails parsing
-
getIndexedArg
public java.util.List<java.lang.String> getIndexedArg(java.lang.String name)
Returns a list of strings representing all of the indexed arguments for the given name. Will return null if there are no indexed values with the given name.
-
getCookie
public java.lang.String getCookie()
-
setCookie
public void setCookie(java.lang.String cookie)
-
getLocale
public java.util.Locale getLocale()
Retruns the locale of the calling client
-
setLocaleCodes
public void setLocaleCodes(java.lang.String[] localeCode)
Not part of the public API - used by the MessageParser
-
-