Errai 3.0.1-SNAPSHOT

org.jboss.errai.enterprise.client.cdi.api
Class CDI

java.lang.Object
  extended by org.jboss.errai.enterprise.client.cdi.api.CDI

public class CDI
extends Object

CDI client interface.

Author:
Heiko Braun , Christian Sadilek , Mike Brock

Field Summary
static String CDI_SERVICE_SUBJECT_PREFIX
           
static String CDI_SUBJECT_PREFIX
           
static String CLIENT_DISPATCHER_SUBJECT
           
static MessageCallback ROUTING_CALLBACK
           
static String SERVER_DISPATCHER_SUBJECT
           
 
Constructor Summary
CDI()
           
 
Method Summary
 void __resetSubsystem()
          Should only be called by bootstrapper for testing purposes.
static void activate(String... remoteTypes)
           
static void addPostInitTask(Runnable runnable)
           
static void addRemoteEventType(String remoteEvent)
           
static void addRemoteEventTypes(String[] remoteEvent)
           
static void consumeEventFromMessage(Message message)
           
static void fireEvent(boolean local, Object payload, Annotation... qualifiers)
           
static void fireEvent(Object payload, Annotation... qualifiers)
           
static Set<String> getQualifiersPart(Annotation[] qualifiers)
          Return a list of string representations for the qualifiers.
static String getSubjectNameByType(String typeName)
           
 void initLookupTable(CDIEventTypeLookup lookup)
           
static void resendSubscriptionRequestForAllEventTypes()
          Informs the server of all active CDI observers currently registered on the client.
static Subscription subscribe(String eventType, AbstractCDIEventCallback<?> callback)
           
static Subscription subscribeLocal(String eventType, AbstractCDIEventCallback<?> callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CDI_SUBJECT_PREFIX

public static final String CDI_SUBJECT_PREFIX
See Also:
Constant Field Values

CDI_SERVICE_SUBJECT_PREFIX

public static final String CDI_SERVICE_SUBJECT_PREFIX
See Also:
Constant Field Values

SERVER_DISPATCHER_SUBJECT

public static final String SERVER_DISPATCHER_SUBJECT
See Also:
Constant Field Values

CLIENT_DISPATCHER_SUBJECT

public static final String CLIENT_DISPATCHER_SUBJECT
See Also:
Constant Field Values

ROUTING_CALLBACK

public static final MessageCallback ROUTING_CALLBACK
Constructor Detail

CDI

public CDI()
Method Detail

getSubjectNameByType

public static String getSubjectNameByType(String typeName)

__resetSubsystem

public void __resetSubsystem()
Should only be called by bootstrapper for testing purposes.


initLookupTable

public void initLookupTable(CDIEventTypeLookup lookup)

getQualifiersPart

public static Set<String> getQualifiersPart(Annotation[] qualifiers)
Return a list of string representations for the qualifiers.

Parameters:
qualifiers - -
Returns:

fireEvent

public static void fireEvent(Object payload,
                             Annotation... qualifiers)

fireEvent

public static void fireEvent(boolean local,
                             Object payload,
                             Annotation... qualifiers)

subscribeLocal

public static Subscription subscribeLocal(String eventType,
                                          AbstractCDIEventCallback<?> callback)

subscribe

public static Subscription subscribe(String eventType,
                                     AbstractCDIEventCallback<?> callback)

resendSubscriptionRequestForAllEventTypes

public static void resendSubscriptionRequestForAllEventTypes()
Informs the server of all active CDI observers currently registered on the client. This is not strictly necessary when the client bus first connects, because observers register themselves with the server as they are created. However, if the QueueSession expires and the bus reconnects, it is essential to inform the server of all existing CDI observers so the server-side event routing can be established for the new session.

Application code should never have to call this method directly. The Errai framework calls this method when required.


consumeEventFromMessage

public static void consumeEventFromMessage(Message message)

addRemoteEventType

public static void addRemoteEventType(String remoteEvent)

addRemoteEventTypes

public static void addRemoteEventTypes(String[] remoteEvent)

addPostInitTask

public static void addPostInitTask(Runnable runnable)

activate

public static void activate(String... remoteTypes)

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.