org.systinet.wasp.webservice
Class Current

java.lang.Object
  extended byorg.systinet.wasp.webservice.Current

public final class Current
extends java.lang.Object

Current can be used for obtaining of current CallContext if it's during call, of ServiceClientContext if it's on the client side, of ServiceEndpointContext or ServiceInstanceContext if it's on the server side. It can be used for determining of current processing type also. This is useful f.e in a case, when there is only one implementation of serializer for both, server and client side and it should behave in different way depending on its location.

Since:
4.5
Component:
Core

Field Summary
static int CLIENT_PROCESSING
          It's in the client processing.
static int NO_PROCESSING
          It's in no processing.
static int SERVER_PROCESSING
          It's in the server processing.
 
Method Summary
static CallContext getCallContext()
          Returns current CallContext.
static int getProcessingType()
          Returns type of the current processing.
static ServiceClientContext getServiceClientContext()
          Returns current ServiceClientContext.
static ServiceEndpointContext getServiceEndpointContext()
          Returns current ServiceEndpointContext.
static ServiceInstanceContext getServiceInstanceContext()
          Returns current ServiceInstanceContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_PROCESSING

public static final int NO_PROCESSING
It's in no processing.

See Also:
getProcessingType(), Constant Field Values

CLIENT_PROCESSING

public static final int CLIENT_PROCESSING
It's in the client processing. It's in an interceptor or handler on the client side during webservice invocation.

See Also:
getProcessingType(), Constant Field Values

SERVER_PROCESSING

public static final int SERVER_PROCESSING
It's in the server processing. It's in an interceptor or handler on the server side when the webservice is invoked.

See Also:
getProcessingType(), Constant Field Values
Method Detail

getServiceEndpointContext

public static ServiceEndpointContext getServiceEndpointContext()
Returns current ServiceEndpointContext. Useful for webservice to get its context or configuration.

Returns:
current context of service endpoint

getServiceInstanceContext

public static ServiceInstanceContext getServiceInstanceContext()
Returns current ServiceInstanceContext. Useful for webservice to get its context or configuration.

Returns:
current context of service instance

getCallContext

public static CallContext getCallContext()
Returns current CallContext. Useful for both client and webservice to access additional data.

Returns:
current call context

getServiceClientContext

public static ServiceClientContext getServiceClientContext()
Returns current ServiceClientContext. Useful for client to get its context or configuration.

Returns:
current context of service client

getProcessingType

public static int getProcessingType()
Returns type of the current processing. Returns CLIENT_PROCESSING when it's during an invocation on the client side. Returns SERVER_PROCESSING when it's during an invocation on the server side. Returns NO_PROCESSING when we aren't in the processing.

Returns:
current processing type. Can be one of the following: CLIENT_PROCESSING, SERVER_PROCESSING or NO_PROCESSING.