jsnpp
documentation

jsnpp
Class Message

java.lang.Object
  extended byjsnpp.Message

public class Message
extends java.lang.Object

SNPP Message Class

Version:
$Id: Message.java,v 1.8 2006/02/01 19:34:41 rizzo Exp $
Author:
Don Seiler

Field Summary
static int MAX_SNPP_LEVEL
           
static int STATE_ALER
           
static int STATE_CALL
           
static int STATE_CONN
           
static int STATE_COVE
           
static int STATE_DATA
           
static int STATE_HOLD
           
static int STATE_LEVE
           
static int STATE_LOGI
           
static int STATE_MESS
           
static int STATE_PAGE
           
static int STATE_QUIT
           
static int STATE_SEND
           
static int STATE_SUBJ
           
static int STATE_UNDEF
           
 
Constructor Summary
Message()
          Constructor
Message(java.lang.String host, int port, java.lang.String pager)
          Constructor
Message(java.lang.String host, int port, java.lang.String pager, java.lang.String message)
          Constructor
Message(java.lang.String host, int port, java.lang.String sender, java.lang.String pager, java.lang.String message)
          Deprecated.  
 
Method Summary
 boolean getAlertOverride()
          Returns alert override
 java.lang.String getCallerIdentifier()
          Returns callerIdentifier
 int getCoverageArea()
          Returns coverage area
 java.lang.String[] getData()
          Returns data
 java.lang.String getHoldUntil()
          Returns "hold until" value
 int getLevel()
          Returns SNPP level of this message
 java.lang.String getLogin()
          Returns login
 java.lang.String getMessage()
          Returns message
 java.lang.String getPager()
          Returns pager
 java.lang.String getRecipient()
          Deprecated.  
 java.lang.String getSENDResponse()
          Returns response from SEND command
 int getServiceLevel()
          Returns service level
 int getState()
          Returns state
 java.lang.String getSubject()
          Returns subject
 void send()
          Connects to server and sends message.
 void setAlertOverride(boolean alertOverride)
          Sets alert override
 void setCallerIdentifier(java.lang.String callerIdentifier)
          Sets callerIdentifer
 void setConnectionInfo(java.lang.String host, int port)
          Sets connection info
 void setCoverageArea(int coverageArea)
          Sets coverage area
 void setData(java.lang.String[] data)
          Sets data
 void setHoldUntil(java.lang.String holdUntil)
          Sets holdUntil Must be in YYMMDDHHMISS format
 void setLevel(int level)
          Sets SNPP level of this message
 void setLogin(java.lang.String login)
          Sets login
 void SetLogin(java.lang.String login, java.lang.String password)
          Sets login with password
 void setMessage(java.lang.String message)
          Sets message
 void setPager(java.lang.String pager)
          Sets pager
 void setRecipient(java.lang.String recipient)
          Deprecated.  
 void setSender(java.lang.String sender)
          Deprecated.  
 void setServiceLevel(int serviceLevel)
          Sets service level
 void setState(int state)
          Sets state
 void setSubject(java.lang.String subject)
          Sets subject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SNPP_LEVEL

public static final int MAX_SNPP_LEVEL
See Also:
Constant Field Values

STATE_UNDEF

public static final int STATE_UNDEF
See Also:
Constant Field Values

STATE_CONN

public static final int STATE_CONN
See Also:
Constant Field Values

STATE_PAGE

public static final int STATE_PAGE
See Also:
Constant Field Values

STATE_MESS

public static final int STATE_MESS
See Also:
Constant Field Values

STATE_SEND

public static final int STATE_SEND
See Also:
Constant Field Values

STATE_QUIT

public static final int STATE_QUIT
See Also:
Constant Field Values

STATE_DATA

public static final int STATE_DATA
See Also:
Constant Field Values

STATE_LOGI

public static final int STATE_LOGI
See Also:
Constant Field Values

STATE_LEVE

public static final int STATE_LEVE
See Also:
Constant Field Values

STATE_COVE

public static final int STATE_COVE
See Also:
Constant Field Values

STATE_SUBJ

public static final int STATE_SUBJ
See Also:
Constant Field Values

STATE_HOLD

public static final int STATE_HOLD
See Also:
Constant Field Values

STATE_CALL

public static final int STATE_CALL
See Also:
Constant Field Values

STATE_ALER

public static final int STATE_ALER
See Also:
Constant Field Values
Constructor Detail

Message

public Message()
Constructor


Message

public Message(java.lang.String host,
               int port,
               java.lang.String pager)
Constructor


Message

public Message(java.lang.String host,
               int port,
               java.lang.String pager,
               java.lang.String message)
Constructor


Message

public Message(java.lang.String host,
               int port,
               java.lang.String sender,
               java.lang.String pager,
               java.lang.String message)
Deprecated.  

Constructor

Method Detail

getState

public int getState()
Returns state


getCallerIdentifier

public java.lang.String getCallerIdentifier()
Returns callerIdentifier


getRecipient

public java.lang.String getRecipient()
Deprecated.  

Returns recipient


getPager

public java.lang.String getPager()
Returns pager


getMessage

public java.lang.String getMessage()
Returns message


setConnectionInfo

public void setConnectionInfo(java.lang.String host,
                              int port)
Sets connection info


setState

public void setState(int state)
Sets state


setSender

public void setSender(java.lang.String sender)
Deprecated.  

Sets sender


setCallerIdentifier

public void setCallerIdentifier(java.lang.String callerIdentifier)
Sets callerIdentifer


setRecipient

public void setRecipient(java.lang.String recipient)
Deprecated.  

Sets recipient


setPager

public void setPager(java.lang.String pager)
Sets pager


setMessage

public void setMessage(java.lang.String message)
Sets message


getLevel

public int getLevel()
Returns SNPP level of this message


setLevel

public void setLevel(int level)
Sets SNPP level of this message


setSubject

public void setSubject(java.lang.String subject)
Sets subject


getSubject

public java.lang.String getSubject()
Returns subject


setData

public void setData(java.lang.String[] data)
Sets data


getData

public java.lang.String[] getData()
Returns data


setAlertOverride

public void setAlertOverride(boolean alertOverride)
Sets alert override


getAlertOverride

public boolean getAlertOverride()
Returns alert override


setHoldUntil

public void setHoldUntil(java.lang.String holdUntil)
Sets holdUntil Must be in YYMMDDHHMISS format


getHoldUntil

public java.lang.String getHoldUntil()
Returns "hold until" value


setLogin

public void setLogin(java.lang.String login)
Sets login


SetLogin

public void SetLogin(java.lang.String login,
                     java.lang.String password)
Sets login with password


getLogin

public java.lang.String getLogin()
Returns login


setCoverageArea

public void setCoverageArea(int coverageArea)
Sets coverage area


getCoverageArea

public int getCoverageArea()
Returns coverage area


setServiceLevel

public void setServiceLevel(int serviceLevel)
Sets service level


getServiceLevel

public int getServiceLevel()
Returns service level


getSENDResponse

public java.lang.String getSENDResponse()
Returns response from SEND command


send

public void send()
          throws java.io.IOException,
                 java.lang.Exception
Connects to server and sends message.

Throws:
java.io.IOException - If bad socket I/O with SNPP server.
java.lang.Exception - If bad or unknown server response received.

jsnpp
documentation

© Copyright 2005 by Don Seiler