SonicMQ API

com.sonicsw.stream
Class SonicStreamConstants

java.lang.Object
  extended by com.sonicsw.stream.SonicStreamConstants

public final class SonicStreamConstants
extends java.lang.Object

Defines properties, notification constants, and error codes used by the SonicStreams api.


Field Summary
static int NOTIFY_REC_COMPLETED
          Predefined notification type: the receiver has successfully received all of the stream data.
static int NOTIFY_REC_ERROR
          Predefined notification type: the receiver encountered an error while receiving the stream.
static int NOTIFY_REC_RETRY_REQ
          Predefined notification type: the receiver is requesting a resend of the stream.
static int NOTIFY_REC_STARTED
          Predefined notification type: the receiver has started receiving the stream.
static java.lang.String STR_ID
          Property name of stream identifier (String property).
static java.lang.String STR_NOTIFY_TYPE
          Property name of notification type, for notification messages (Integer property).
static java.lang.String STR_RECEIVER_ERRORCODE
          Property name of error code, for notification messages (Integer property).
static java.lang.String STR_RECEIVER_ERRORMSG
          Property name of error message textual description sent by receiver (String property).
static java.lang.String STR_RECEIVER_NAME
          Property name of the receiver [that generated notification message] name (String property).
static java.lang.String[] STREAM_ERRORS
          Maps a numeric error code to a String.
static int STRERROR_CONNECTION_LOST
          Error code returned when a SonicInputStreamController has been closed or when a JMS connection drop has been detected.
static int STRERROR_DUPLICATE_STREAMID
          Error code returned by the receiver when a segment arrives with a stream identifier that corresponds to a stream whose segments have already been fully received.
static int STRERROR_ERROR
          Error code returned when an a missing property or object (such as a JMS Connection) is detected.
static int STRERROR_INCOMPLETE_STREAM
          Error code returned by the receiver when the start of another stream with the same stream identifier is detected.
static int STRERROR_INTERRUPTED
          Error code returned when a thread is interrupted while performing a stream-related operation, e.g. waiting for stream segments to arrive.
static int STRERROR_JMS_EXCEPTION
          Error code returned when a JMS exception has been thrown.
static int STRERROR_NO_INITCONTENT
          Error code returned when a segment has been received for a stream that may have been closed or for which a header segment was not received.
static int STRERROR_TIMEOUT
          Error code returned when a read call has waited for longer than the configured timeout for a segment to arrive.
static int STRERROR_USAGE
          Constant that indicates an error on the part of the user (e.g. improper configuration, failure to close an active output stream before creating a new output stream, etc.)
 
Constructor Summary
SonicStreamConstants()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_ID

public static final java.lang.String STR_ID
Property name of stream identifier (String property).

See Also:
Constant Field Values

STR_NOTIFY_TYPE

public static final java.lang.String STR_NOTIFY_TYPE
Property name of notification type, for notification messages (Integer property). Value may be one of the notification type values defined below, or a user-defined value.

See Also:
Constant Field Values

STR_RECEIVER_ERRORCODE

public static final java.lang.String STR_RECEIVER_ERRORCODE
Property name of error code, for notification messages (Integer property). Value may be one of the error codes below.

See Also:
Constant Field Values

STR_RECEIVER_ERRORMSG

public static final java.lang.String STR_RECEIVER_ERRORMSG
Property name of error message textual description sent by receiver (String property).

See Also:
Constant Field Values

STR_RECEIVER_NAME

public static final java.lang.String STR_RECEIVER_NAME
Property name of the receiver [that generated notification message] name (String property).

See Also:
Constant Field Values

NOTIFY_REC_STARTED

public static final int NOTIFY_REC_STARTED
Predefined notification type: the receiver has started receiving the stream.

Note that any user-defined notifications should be defined with a value greater than that of any of the pre-defined types, in order to prevent a conflict.

See Also:
Constant Field Values

NOTIFY_REC_COMPLETED

public static final int NOTIFY_REC_COMPLETED
Predefined notification type: the receiver has successfully received all of the stream data.

Note that any user-defined notifications should be defined with a value greater than that of any of the pre-defined types, in order to prevent a conflict.

See Also:
Constant Field Values

NOTIFY_REC_ERROR

public static final int NOTIFY_REC_ERROR
Predefined notification type: the receiver encountered an error while receiving the stream.

Note that any user-defined notifications should be defined with a value greater than that of any of the pre-defined types, in order to prevent a conflict.

See Also:
Constant Field Values

NOTIFY_REC_RETRY_REQ

public static final int NOTIFY_REC_RETRY_REQ
Predefined notification type: the receiver is requesting a resend of the stream.

Note that any user-defined notifications should be defined with a value greater than that of any of the pre-defined types, in order to prevent a conflict.

See Also:
Constant Field Values

STRERROR_USAGE

public static final int STRERROR_USAGE
Constant that indicates an error on the part of the user (e.g. improper configuration, failure to close an active output stream before creating a new output stream, etc.) User action: based on the error text, make the necessary correction(s) to the application code.

See Also:
Constant Field Values

STRERROR_TIMEOUT

public static final int STRERROR_TIMEOUT
Error code returned when a read call has waited for longer than the configured timeout for a segment to arrive. User action: release the current stream and get the next stream.

See Also:
Constant Field Values

STRERROR_NO_INITCONTENT

public static final int STRERROR_NO_INITCONTENT
Error code returned when a segment has been received for a stream that may have been closed or for which a header segment was not received. User action: have the sender create a new stream and resend the object/data.

See Also:
Constant Field Values

STRERROR_INCOMPLETE_STREAM

public static final int STRERROR_INCOMPLETE_STREAM
Error code returned by the receiver when the start of another stream with the same stream identifier is detected. This typically occurs when a sender is resending the contents of a stream (e.g. in the event of the detection of an initial failed send attempt). User action: release the current stream and get the next stream.

See Also:
Constant Field Values

STRERROR_DUPLICATE_STREAMID

public static final int STRERROR_DUPLICATE_STREAMID
Error code returned by the receiver when a segment arrives with a stream identifier that corresponds to a stream whose segments have already been fully received. Basically, this error code indicates that a duplicate segement was received. User action: none required; the duplicate chunk will be discarded on the receiving side.

See Also:
Constant Field Values

STRERROR_JMS_EXCEPTION

public static final int STRERROR_JMS_EXCEPTION
Error code returned when a JMS exception has been thrown. This may occur in the case of a lost/closed JMS session, etc. User action: dependent upon actual cause of exception (indicated in exception text); e.g. in the case of a failure while attempting to obtain a SonicStream instance from a SonicInputStreamController instance, it may be necessary to make another attempt or to close the existing controller instance and then create a new controller instance.

See Also:
Constant Field Values

STRERROR_CONNECTION_LOST

public static final int STRERROR_CONNECTION_LOST
Error code returned when a SonicInputStreamController has been closed or when a JMS connection drop has been detected. User action: create a new controller instance and/or re-establish the JMS connection.

See Also:
Constant Field Values

STRERROR_ERROR

public static final int STRERROR_ERROR
Error code returned when an a missing property or object (such as a JMS Connection) is detected. User action: take the appropriate steps based on the exception text; e.g. if the exception occurred because a reference to a JMS Connection instance was not supplied to the factory method createSonicOutputStreamController, the application code must be modified to provide the missing reference.

See Also:
Constant Field Values

STRERROR_INTERRUPTED

public static final int STRERROR_INTERRUPTED
Error code returned when a thread is interrupted while performing a stream-related operation, e.g. waiting for stream segments to arrive. This may occur if an application begins shutting down while a stream is being read or sent. User action: Dependent upon the source of the interruption; e.g. if the interruption is caused by an application being shut down, no steps may be necessary.

See Also:
Constant Field Values

STREAM_ERRORS

public static final java.lang.String[] STREAM_ERRORS
Maps a numeric error code to a String.

Constructor Detail

SonicStreamConstants

public SonicStreamConstants()

SonicMQ API

Copyright © 1999-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 5-August-2011.