Tabnine Logo
EJBClientContext.registerConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
registerConnection
method
in
org.jboss.ejb.client.EJBClientContext

Best Java code snippets using org.jboss.ejb.client.EJBClientContext.registerConnection (Showing top 3 results out of 315)

origin: org.jboss/jboss-remote-naming

@Override
public void associate(final Connection connection) {
  this.ejbClientContext.registerConnection(connection);
}
origin: org.jboss/jboss-remote-naming

  private EJBClientContext getContext(final Connection connection) {
    synchronized (contextByConnection) {
      EJBClientContext ret = contextByConnection.get(connection);
      if(ret == null) {
        ret = EJBClientContext.create();
        ret.registerConnection(connection);
        contextByConnection.put(connection, ret);
        connection.addCloseHandler(new CloseHandler<Connection>() {
          @Override
          public void handleClose(final Connection connection, final IOException e) {
            synchronized (contextByConnection) {
              contextByConnection.remove(connection);
            }
          }
        });
      }
      return ret;
    }
  }
}
origin: org.jboss.as/jboss-as-appclient

private synchronized void createConnection() {
  try {
    endpoint = Remoting.createEndpoint("endpoint", OptionMap.EMPTY);
    endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.create(Options.SSL_ENABLED, Boolean.FALSE));
    // open a connection
    final IoFuture<Connection> futureConnection = endpoint.connect(new URI(hostUrl), OptionMap.create(Options.SASL_POLICY_NOANONYMOUS, Boolean.FALSE, Options.SASL_POLICY_NOPLAINTEXT, Boolean.FALSE), callbackHandler);
    connection = IoFutureHelper.get(futureConnection, 30L, TimeUnit.SECONDS);
    final EJBClientContext ejbClientContext = EJBClientContext.create();
    ejbClientContext.registerConnection(connection);
    this.clientContext = ejbClientContext;
  } catch (IOException e) {
    throw new RuntimeException(e);
  } catch (URISyntaxException e) {
    throw new RuntimeException(e);
  }
}
org.jboss.ejb.clientEJBClientContextregisterConnection

Popular methods of EJBClientContext

  • setSelector
  • getContextManager
    Get the context manager.
  • getAttachment
  • <init>
  • calculateMethodInterceptors
  • create
  • createSession
  • createSessionCreationInvocationContext
  • getClassPathInterceptors
  • getClusterNodeSelector
  • getConfiguredConnections
    Get the pre-configured connections for this context. This information may not be used by some transp
  • getConfiguredPerClassInterceptors
  • getConfiguredConnections,
  • getConfiguredPerClassInterceptors,
  • getConfiguredPerMethodInterceptors,
  • getCurrent,
  • getDeploymentNodeSelector,
  • getGlobalInterceptors,
  • getInterceptors,
  • getInvocationTimeout,
  • getMaximumConnectedClusterNodes,
  • getTransportProvider

Popular in Java

  • Running tasks concurrently on multiple threads
  • getContentResolver (Context)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now