Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.jws.control
Interface Context.Callback

All Known Subinterfaces:
  ControlContext.Callback, JpdContext.Callback, JwsContext.Callback, JwsContext.Callback

Enclosing interface:
  Context

    public static interface Context.Callback

Defines callback events that may be received by the container.

Method Summary
`void` | `onAgeTimeout(long age)` Received by conversational web services when the current instance has reached its maximum lifetime.
`void` | `onAsyncFailure(String methodName, Object[] args)` Received when an asynchronous (or, message-buffered) method is unable to be succesfully delivered.
`void` | `onCreate()` Received after a new instance has been created and system initialization (of context object and contained controls) has been completed.
`void` | `onException(Exception e, String methodName, Object[] args)` Received when a web service operation throws an uncaught exception.
`void` | `onFinish(boolean expired)` Received by conversational web services when the current instance is about to be finished.
`void` | `onIdleTimeout(long time)` Received by conversational web services when the current instance has reached its maximum idle timeout.

Method Detail

### onCreate

    void onCreate()

  Received after a new instance has been created and system initialization (of context object and contained controls) has been completed.

### onAgeTimeout

    void onAgeTimeout(long age)

  Received by conversational web services when the current instance has reached its maximum lifetime. The conversation finishes when the handler for this callback has finished executing.

  Parameters:
    `age` - The age of the conversation that has timed out.

### onIdleTimeout

    void onIdleTimeout(long time)

  Received by conversational web services when the current instance has reached its maximum idle timeout. The conversation finishes when the handler for this callback has finished executing.

  Parameters:
    `time` - The current time in milliseconds.

### onFinish

    void onFinish(boolean expired)

  Received by conversational web services when the current instance is about to be finished. The conversation may be ending due to a call to the finishConversation method, a timeout, or successful completion of a method annotated with `@conversation phase="finish"`.

  Parameters:
    `expired` - `true` if the conversation finished because it timed out; otherwise, `false`.

### onException

    void onException(Exception e,
                     String methodName,
                     Object[] args)

  Received when a web service operation throws an uncaught exception.
  Implement a handler for this callback as a single place to catch exceptions thrown from operation methods. You implement a callback handler that will execute when your service receives this callback from WebLogic Server.
  The following code might be used for debugging. Prior for deployment, you might replace it with code that logs this information instead. Notice that this code also ends the conversation in which the service might have been participating. This frees no-longer-needed resources.

       public void context_onException(Exception e, String methodName, Object[] arguments)
       {
           System.out.println("MyService: exception in " + methodName + "(" +
               arguments + "). Exception: " + e);
               context.finishConversation();
       }

  Not all methods in a web service are necessarily operations. In web services, an operation is a method specifically exposed to clients. In WebLogic Workshop, the source code of an operation is preceded by an @common:operation annotation.
  Note that in previous releases, the @common:operation tag was known as the @jws:operation tag. This tag is still supported for backward compatibility.

  Parameters:
    `e` - The exception object thrown from the method.
    `methodName` - The name of the method from which the exception was thrown.
    `args` - An array containing the parameters of the method that threw the exception.

### onAsyncFailure

    void onAsyncFailure(String methodName,
                        Object[] args)

  Received when an asynchronous (or, message-buffered) method is unable to be succesfully delivered.

  Parameters:
    `methodName` - The method that could not be delivered.
    `args` - An array containing the parameters of the method.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD