org.marre.wap.push
Class WapSLPush

java.lang.Object
  extended byorg.marre.wap.push.WapSLPush
All Implemented Interfaces:
WbxmlDocument, XmlDocument

public class WapSLPush
extends java.lang.Object
implements WbxmlDocument

Represents a WAP Service Loading Push message.

Version:
$Id: WapSLPush.java,v 1.1 2005/08/02 19:57:32 c95men Exp $
Author:
Markus

Field Summary
protected  java.lang.String action_
          The action.
static java.lang.String ACTION_EXECUTE_CACHE
          Action, execute-cache
static java.lang.String ACTION_EXECUTE_HIGH
          Action, execute-high
static java.lang.String ACTION_EXECUTE_LOW
          Action, execute-low
static java.lang.String[] SL_ATTR_START_TOKENS
          WBXML attr start tokens for wap sl push.
static java.lang.String[] SL_ATTR_VALUE_TOKENS
          WBXML attr value tokens for wap sl push.
static java.lang.String[] SL_TAG_TOKENS
          WBXML tag tokens for wap sl push.
protected  java.lang.String uri_
          The uri.
static java.lang.String WBXML_CONTENT_TYPE
          WBXML content type
static java.lang.String XML_CONTENT_TYPE
          XML content type
 
Constructor Summary
WapSLPush(java.lang.String uri)
          Constructor.
 
Method Summary
 java.lang.String getAction()
          Retrieves the current set action.
 java.lang.String getContentType()
          Returns the text content type.
 java.lang.String getUri()
          Returns the URI.
 java.lang.String getWbxmlContentType()
          Returns the wbxml content type.
 XmlWriter getWbxmlWriter(java.io.OutputStream os)
          Returns a wbxml writer.
 void setAction(java.lang.String action)
          Set the action.
 void setUri(java.lang.String uri)
          Sets the URI.
 void writeXmlTo(XmlWriter writer)
          Writes the xml document to the given writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WBXML_CONTENT_TYPE

public static final java.lang.String WBXML_CONTENT_TYPE
WBXML content type

See Also:
Constant Field Values

XML_CONTENT_TYPE

public static final java.lang.String XML_CONTENT_TYPE
XML content type

See Also:
Constant Field Values

ACTION_EXECUTE_LOW

public static final java.lang.String ACTION_EXECUTE_LOW
Action, execute-low

See Also:
Constant Field Values

ACTION_EXECUTE_HIGH

public static final java.lang.String ACTION_EXECUTE_HIGH
Action, execute-high

See Also:
Constant Field Values

ACTION_EXECUTE_CACHE

public static final java.lang.String ACTION_EXECUTE_CACHE
Action, execute-cache

See Also:
Constant Field Values

SL_TAG_TOKENS

public static final java.lang.String[] SL_TAG_TOKENS
WBXML tag tokens for wap sl push.


SL_ATTR_START_TOKENS

public static final java.lang.String[] SL_ATTR_START_TOKENS
WBXML attr start tokens for wap sl push.


SL_ATTR_VALUE_TOKENS

public static final java.lang.String[] SL_ATTR_VALUE_TOKENS
WBXML attr value tokens for wap sl push.


uri_

protected java.lang.String uri_
The uri.


action_

protected java.lang.String action_
The action.

Constructor Detail

WapSLPush

public WapSLPush(java.lang.String uri)
Constructor.

Parameters:
uri -
Method Detail

getUri

public java.lang.String getUri()
Returns the URI.

Returns:

setUri

public void setUri(java.lang.String uri)
Sets the URI.

Parameters:
uri -

getAction

public java.lang.String getAction()
Retrieves the current set action.

Returns:
Action or null if not set.

setAction

public void setAction(java.lang.String action)
Set the action.

Parameters:
action - Can be ACTION_EXECUTE_LOW, ACTION_EXECUTE_HIGH or ACTION_EXECUTE_CACHE.

writeXmlTo

public void writeXmlTo(XmlWriter writer)
                throws java.io.IOException
Writes the xml document to the given writer.

Specified by:
writeXmlTo in interface XmlDocument
Parameters:
writer -
Throws:
java.io.IOException - Thrown if failed to write to xmlwriter.

getWbxmlWriter

public XmlWriter getWbxmlWriter(java.io.OutputStream os)
Returns a wbxml writer.

Specified by:
getWbxmlWriter in interface WbxmlDocument
Parameters:
os - The os to write to.
Returns:
Wbxml writer.

getWbxmlContentType

public java.lang.String getWbxmlContentType()
Returns the wbxml content type.

Specified by:
getWbxmlContentType in interface WbxmlDocument
Returns:
wbxml content type.

getContentType

public java.lang.String getContentType()
Returns the text content type.

Specified by:
getContentType in interface XmlDocument
Returns:
Content type


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.