SmartFrog 3.10.000

org.smartfrog.sfcore.common
Class SmartFrogResolutionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.smartfrog.sfcore.common.SmartFrogException
              extended by org.smartfrog.sfcore.common.SmartFrogRuntimeException
                  extended by org.smartfrog.sfcore.common.SmartFrogResolutionException
All Implemented Interfaces:
java.io.Serializable, MessageKeys

public class SmartFrogResolutionException
extends SmartFrogRuntimeException
implements MessageKeys, java.io.Serializable

SmartFrogResolutionException is thrown system fails to resolve some reference.

See Also:
Serialized Form

Field Summary
static java.lang.String CONTAINER_ERROR_MSG
          Attribute name for reference container.
static java.lang.String DEFAULT_OBJECT_CLASS_TYPE
          Attribute name for default value classtype in exceptioncontext.
static java.lang.String DEPTH
          Attribute name for depth in exceptioncontext.
static java.lang.String PATH
          Attribute name for path in exceptioncontext.
static java.lang.String REFERENCE_OBJECT_CLASS_TYPE
          Attribute name for reference value classtype in exceptioncontext.
static java.lang.String REFERENCE_OBJECT_RESOLVED
          Attribute name for reference value classtype in exceptioncontext.
 
Fields inherited from class org.smartfrog.sfcore.common.SmartFrogRuntimeException
REFERENCE, SOURCE
 
Fields inherited from class org.smartfrog.sfcore.common.SmartFrogException
CONTEXT, cxt, DATA, EXCEPTION, PRIM_COMPLETE_NAME, PRIM_CONTEXT
 
Fields inherited from interface org.smartfrog.sfcore.common.MessageKeys
CANNOT_LINK_TO_PREDICATE, COMPONENT_TERMINATED, COPY_FAILED, COPY_SERIALIZE_FAILED, ERROR_NO_SECURITY_BUT_REQUIRED, ILLEGAL_BOOLEAN_PARAMETER, ILLEGAL_NUMERIC_PARAMETER, ILLEGAL_STRING_PARAMETER, ILLEGAL_VECTOR_PARAMETER, LIVENESS_SEND_FAILURE, LIVENESS_SEND_FAILURE_IN, MISSING_PARAMETER, MSG_CLASS_NOT_FOUND, MSG_CONNECT_ERR, MSG_CONT_OTHER_DEPLOY, MSG_DEPLOY_COMP_TERMINATED, MSG_DEPLOY_SUCCESS, MSG_DEPLOYWITH_PHASE_FAILED, MSG_DETACH_SUCCESS, MSG_DETACH_TERMINATE_SUCCESS, MSG_ERR_DEPLOY_FROM_URL, MSG_ERR_PARSE, MSG_ERR_RESOLVE_PHASE, MSG_ERR_SF_RUNNING, MSG_ERR_TERM, MSG_FAILED_INET_ADDRESS_LOOKUP, MSG_FAILED_TO_CONTACT_PARENT, MSG_FILE_NOT_FOUND, MSG_HOOK_ACTION_FAILED, MSG_ILLEGAL_ACCESS, MSG_ILLEGAL_CLASS_TYPE, MSG_ILLEGAL_CLASS_TYPE_EXPECTING_GOT, MSG_ILLEGAL_REFERENCE, MSG_INPUTSTREAM_NULL, MSG_INSTANTIATION_ERROR, MSG_INVALID_OBJECT_TYPE, MSG_INVOCATION_TARGET, MSG_LANG_NOT_FOUND, MSG_LIVENESS_START_FAILED, MSG_LOADING_URL, MSG_METHOD_NOT_FOUND, MSG_NON_REP_ATTRIB, MSG_NOT_COMPONENT_REFERENCE, MSG_NOT_FOUND_ATTRIBUTE, MSG_NOT_FOUND_REFERENCE, MSG_NOT_VALUE_REFERENCE, MSG_NULL_DEF_METHOD, MSG_NULL_URL, MSG_OBJECT_REGISTRATION_FAILED, MSG_PARENT_LOCATION_FAILED, MSG_PING_SUCCESS, MSG_RANDM_ERR, MSG_REMOTE_CONNECT_ERR, MSG_REPEATED_ATTRIBUTE, MSG_SF_DEAD, MSG_SF_READY, MSG_SF_TERMINATED, MSG_STACKTRACE_FOLLOWS, MSG_START_COMP_TERMINATED, MSG_TERMINATE_SUCCESS, MSG_UNHANDLED_EXCEPTION, MSG_UNKNOWN_HOST, MSG_UNRESOLVED_REFERENCE, MSG_UNRESOLVED_REFERENCE_IN, MSG_UPDATE_SUCCESS, MSG_URL_NOT_FOUND, MSG_URL_TO_PARSE_NOT_FOUND, MSG_WARNING_LIVENESS_ENABLED, MSG_WARNING_STACKTRACE_DISABLED, MSG_WARNING_STACKTRACE_ENABLED, ROOT_MUST_BE_COMPONENT, WARN_NO_SECURITY
 
Constructor Summary
SmartFrogResolutionException(Reference ref, Reference source, java.lang.String reason)
          Constructs a SmartFrogResolutionException with reference and reason.
SmartFrogResolutionException(Reference ref, Reference source, java.lang.String reason, java.lang.Object data)
          Constructs a SmartFrogResolutionException with reference and reason and additional data.
SmartFrogResolutionException(Reference ref, Reference source, java.lang.String reason, java.lang.Object data, java.lang.Throwable cause, Prim sfObject)
          Constructs a SmartFrogResolutionException with reference and reason and additional data.
SmartFrogResolutionException(Reference ref, java.lang.String reason)
          Constructs a SmartFrogResolutionException with reference and reason.
SmartFrogResolutionException(java.lang.String message)
          Constructs a SmartFrogResolutionException with message.
SmartFrogResolutionException(java.lang.String message, Prim sfObject)
          Constructs a SmartFrogResolutionException with message.
SmartFrogResolutionException(java.lang.String message, java.lang.Throwable cause)
          Constructs a SmartFrogResolutionException with message and cause.
SmartFrogResolutionException(java.lang.String message, java.lang.Throwable cause, Prim sfObject)
          Constructs a SmartFrogResolutionException with message and cause.
SmartFrogResolutionException(java.lang.Throwable cause)
          Constructs a SmartFrogResolutionException with cause.
SmartFrogResolutionException(java.lang.Throwable cause, Prim sfObject)
          Constructs a SmartFrogResolutionException with cause.
 
Method Summary
 int appendPath(java.lang.String ref)
          Appends the path information.
static SmartFrogException forward(java.lang.String message, Reference r, java.lang.Throwable thr)
          To forward SmartFrog exceptions instead of chain them.
static SmartFrogException forward(java.lang.Throwable thr)
          To forward SmartFrog exceptions instead of chain them.
static SmartFrogResolutionException generic(Reference ref, Reference source, java.lang.String message)
          Creates a generic resolution exception.
static SmartFrogResolutionException generic(Reference ref, java.lang.String message)
          Creates a generic SmartFrogResolutionException with reference and message.
static SmartFrogResolutionException illegalClassType(Reference ref, Reference source)
          Creates an illegal reference resolution exception.
static SmartFrogResolutionException illegalClassType(Reference ref, Reference source, java.lang.Object resolvedValue, java.lang.String referenceValueType, java.lang.String defaultValueType)
          Creates an illegal reference resolution exception.
static SmartFrogResolutionException illegalReference(Reference ref, Reference source)
          Creates an illegal reference resolution exception.
static SmartFrogResolutionException notComponent(Reference ref, Reference source)
          Creates a not a component reference resolution exception.
static SmartFrogResolutionException notFound(Reference ref, Reference source)
          Creates a not found resolution exception.
static SmartFrogResolutionException notFound(Reference ref, Reference source, java.lang.Throwable cause)
          Creates a not found resolution exception.
static SmartFrogResolutionException notValue(Reference ref, Reference source)
          Creates a not a component reference value resolution exception.
 void setContainer(java.lang.Object failedReference, java.lang.Object containerObj)
          Adds information message about a resolve failure in a reference contained in containerObj
 int sizePath()
          Appends the path information.
 java.lang.String toString(java.lang.String nm)
          Returns a string representation of the resolution exception.
 
Methods inherited from class org.smartfrog.sfcore.common.SmartFrogRuntimeException
forward, init
 
Methods inherited from class org.smartfrog.sfcore.common.SmartFrogException
add, contains, containsKey, get, getCauseMessage, getContext, put, put, serializableContext, setContext, shortClassName, toString, toStringAll, toStringAll
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PATH

public static final java.lang.String PATH
Attribute name for path in exceptioncontext.

See Also:
Constant Field Values

DEPTH

public static final java.lang.String DEPTH
Attribute name for depth in exceptioncontext.

See Also:
Constant Field Values

DEFAULT_OBJECT_CLASS_TYPE

public static final java.lang.String DEFAULT_OBJECT_CLASS_TYPE
Attribute name for default value classtype in exceptioncontext.

See Also:
Constant Field Values

REFERENCE_OBJECT_CLASS_TYPE

public static final java.lang.String REFERENCE_OBJECT_CLASS_TYPE
Attribute name for reference value classtype in exceptioncontext.

See Also:
Constant Field Values

REFERENCE_OBJECT_RESOLVED

public static final java.lang.String REFERENCE_OBJECT_RESOLVED
Attribute name for reference value classtype in exceptioncontext.

See Also:
Constant Field Values

CONTAINER_ERROR_MSG

public static final java.lang.String CONTAINER_ERROR_MSG
Attribute name for reference container.

See Also:
Constant Field Values
Constructor Detail

SmartFrogResolutionException

public SmartFrogResolutionException(java.lang.String message)
Constructs a SmartFrogResolutionException with message.

Parameters:
message - exception message

SmartFrogResolutionException

public SmartFrogResolutionException(java.lang.Throwable cause)
Constructs a SmartFrogResolutionException with cause.

Parameters:
cause - exception causing this exception

SmartFrogResolutionException

public SmartFrogResolutionException(java.lang.Throwable cause,
                                    Prim sfObject)
Constructs a SmartFrogResolutionException with cause. Also initializes the exception context with component details.

Parameters:
cause - exception causing this exception
sfObject - component that encountered exception

SmartFrogResolutionException

public SmartFrogResolutionException(java.lang.String message,
                                    java.lang.Throwable cause)
Constructs a SmartFrogResolutionException with message and cause.

Parameters:
message - exception message
cause - exception causing this exception

SmartFrogResolutionException

public SmartFrogResolutionException(java.lang.String message,
                                    Prim sfObject)
Constructs a SmartFrogResolutionException with message. Also initializes the exception context with component details.

Parameters:
message - message
sfObject - component that encountered exception

SmartFrogResolutionException

public SmartFrogResolutionException(java.lang.String message,
                                    java.lang.Throwable cause,
                                    Prim sfObject)
Constructs a SmartFrogResolutionException with message and cause. Also initializes the exception context with component details

Parameters:
message - message
cause - exception causing this exception
sfObject - component that encountered exception

SmartFrogResolutionException

public SmartFrogResolutionException(Reference ref,
                                    java.lang.String reason)
Constructs a SmartFrogResolutionException with reference and reason.

Parameters:
ref - reference causing the resolution exception
reason - message for exception

SmartFrogResolutionException

public SmartFrogResolutionException(Reference ref,
                                    Reference source,
                                    java.lang.String reason)
Constructs a SmartFrogResolutionException with reference and reason.

Parameters:
ref - reference causing the resolution exception
source - source that raised the exception
reason - message for exception

SmartFrogResolutionException

public SmartFrogResolutionException(Reference ref,
                                    Reference source,
                                    java.lang.String reason,
                                    java.lang.Object data)
Constructs a SmartFrogResolutionException with reference and reason and additional data.

Parameters:
ref - reference causing the resolution exceptioh
source - source that raised the exception
reason - message for exception
data - additional data for exception

SmartFrogResolutionException

public SmartFrogResolutionException(Reference ref,
                                    Reference source,
                                    java.lang.String reason,
                                    java.lang.Object data,
                                    java.lang.Throwable cause,
                                    Prim sfObject)
Constructs a SmartFrogResolutionException with reference and reason and additional data.

Parameters:
ref - reference causing the resolution exception
source - source that raised the exception
reason - message for exception
data - additional data for exception
cause - exception causing this exception
sfObject - component that encountered exception *
Method Detail

generic

public static SmartFrogResolutionException generic(Reference ref,
                                                   java.lang.String message)
Creates a generic SmartFrogResolutionException with reference and message.

Parameters:
ref - reference leading to exception
message - The message associated with the failure
Returns:
a SmartFrogResolution exception

generic

public static SmartFrogResolutionException generic(Reference ref,
                                                   Reference source,
                                                   java.lang.String message)
Creates a generic resolution exception.

Parameters:
ref - reference leading to exception
source - The source that was trying to resolve the reference
message - The message associated with the failure
Returns:
a resolution exception

notFound

public static SmartFrogResolutionException notFound(Reference ref,
                                                    Reference source)
Creates a not found resolution exception.

Parameters:
ref - reference leading to exception
source - The source that was trying to resolve the reference
Returns:
a resolution exception

notFound

public static SmartFrogResolutionException notFound(Reference ref,
                                                    Reference source,
                                                    java.lang.Throwable cause)
Creates a not found resolution exception.

Parameters:
ref - reference leading to exception
source - The source that was trying to resolve the reference
cause - cause exception causing this exception
Returns:
a resolution exception

notComponent

public static SmartFrogResolutionException notComponent(Reference ref,
                                                        Reference source)
Creates a not a component reference resolution exception.

Parameters:
ref - reference leading to exception
source - The source that was trying to resolve the reference
Returns:
a resolution exception

notValue

public static SmartFrogResolutionException notValue(Reference ref,
                                                    Reference source)
Creates a not a component reference value resolution exception.

Parameters:
ref - reference leading to exception
source - The source that was trying to resolve the reference
Returns:
a resolution exception

illegalReference

public static SmartFrogResolutionException illegalReference(Reference ref,
                                                            Reference source)
Creates an illegal reference resolution exception.

Parameters:
ref - ref causing the illegal reference
source - The source that was trying to resolve the reference
Returns:
a resolution exception

illegalClassType

public static SmartFrogResolutionException illegalClassType(Reference ref,
                                                            Reference source)
Creates an illegal reference resolution exception.

Parameters:
ref - ref causing the illegal reference
source - The source that was trying to resolve the reference
Returns:
a resolution exception

illegalClassType

public static SmartFrogResolutionException illegalClassType(Reference ref,
                                                            Reference source,
                                                            java.lang.Object resolvedValue,
                                                            java.lang.String referenceValueType,
                                                            java.lang.String defaultValueType)
Creates an illegal reference resolution exception.

Parameters:
ref - ref causing the illegal reference
source - The source that was trying to resolve the reference
resolvedValue - Object found by sfResolve
referenceValueType - The reference value type
defaultValueType - The default value type
Returns:
a resolution exception

forward

public static SmartFrogException forward(java.lang.Throwable thr)
To forward SmartFrog exceptions instead of chain them.

Parameters:
thr - throwable object to be forwarded
Returns:
SmartFrogException that is a SmartFrogResolutionException

forward

public static SmartFrogException forward(java.lang.String message,
                                         Reference r,
                                         java.lang.Throwable thr)
To forward SmartFrog exceptions instead of chain them.

Parameters:
message - to add to the exception
thr - throwable object to be forwarded
r - reference causing the resolution exception
Returns:
SmartFrogException that is a SmartFrogResolutionException

appendPath

public int appendPath(java.lang.String ref)
Appends the path information.

Parameters:
ref - ref causing the illegal reference
Returns:
a resolution exception

sizePath

public int sizePath()
Appends the path information.

Returns:
a resolution exception

setContainer

public void setContainer(java.lang.Object failedReference,
                         java.lang.Object containerObj)
Adds information message about a resolve failure in a reference contained in containerObj

Parameters:
containerObj - Object
failedReference - Object

toString

public java.lang.String toString(java.lang.String nm)
Returns a string representation of the resolution exception.

Overrides:
toString in class SmartFrogRuntimeException
Parameters:
nm - Message separator (ex. "\n");
Returns:
string representation of the resolution exception

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP