Package fr.dyade.aaa.jndi2.distributed

Examples of fr.dyade.aaa.jndi2.distributed.DistributedJndiServer


    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG,
                       "JndiServer.doReact((TcpRequestNot)" +
                       not + ')');
    RequestContext reqCtx = not.getRequestContext();
    JndiReply reply = manager.invoke(reqCtx);
    if (reply != null) {
      reqCtx.reply(reply);
    }
  }
View Full Code Here


  public JndiReply invoke(RequestContext reqCtx) {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG,
                       "RequestManager.invoke(" + reqCtx + ')');
    JndiRequest request = reqCtx.getRequest();
    try {     
      if (request instanceof JndiReadRequest) {
        // 1- Dispatch the read requests
        return invokeReadRequest(reqCtx);
      } else if (request instanceof JndiAdminRequest) {
View Full Code Here

  protected JndiReply invokeReadRequest(RequestContext reqCtx)
    throws NamingException {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG,
                       "RequestManager.invokeReadRequest(" + reqCtx + ')');
    JndiRequest request = reqCtx.getRequest();
    if (request instanceof LookupRequest) {
      Object obj = lookup((LookupRequest)request);
      if (obj != null) {
        ObjectRecord or = (ObjectRecord)obj;
        return new LookupReply(or.getObject());
View Full Code Here

    throws NamingException {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG,
                       "RequestManager.invokeWriteRequest(" + reqCtx + ',' + ')');
    try {
      JndiRequest request = reqCtx.getRequest();

      if (request instanceof BindRequest) {
        bind((BindRequest)request);       
        return new JndiReply();
      } else if (request instanceof UnbindRequest) {
View Full Code Here

        reqCtx);
    }
  }

  protected JndiReply invokeAdminRequest(RequestContext reqCtx) throws NamingException {
    JndiRequest request = reqCtx.getRequest();
   
    if (request instanceof ChangeOwnerRequest) {
      changeOwner((ChangeOwnerRequest)request);
      return new JndiReply();
    }
View Full Code Here

                                  RequestContext reqCtx) {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG,
                       "ReplicationManager.invokeOwner(" +
                       owner + ',' + reqCtx + ')');
    JndiRequest request = reqCtx.getRequest();   
    if (request instanceof CreateSubcontextRequest) {
      CreateSubcontextRequest csr =
        (CreateSubcontextRequest)request;
      request = new CreateRemoteSubcontextRequest(
                                                  csr.getName(),
View Full Code Here

      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
      throw exc;
    }
   
    ListBindingsReply lbr = (ListBindingsReply)reply;

    // 1- resolve contexts
    Binding[] bindings = lbr.getContexts();
    for (int i = 0; i < bindings.length; i++) {
      CompositeName subCtxPath = (CompositeName)queryPath.clone();
      subCtxPath.add(bindings[i].getName());
      bindings[i].setObject(new NamingContextImpl(
        connection.cloneConnection(), subCtxPath));
    }

    // 2- resolve references
    lbr.resolveReferences();
    return lbr.getEnumeration();
  }
View Full Code Here

      }
      // This is a context record
      return new JndiReply();
    } else if (request instanceof ListBindingsRequest) {
      Object obj = listBindings((ListBindingsRequest)request);
      return new ListBindingsReply((Binding[])obj);
    } else if (request instanceof ListRequest) {
      Object obj = list((ListRequest)request);
      return new ListReply((NameClassPair[])obj);
    } else {
      return new JndiError(
View Full Code Here

  public NamingEnumeration listBindings(String name) throws NamingException {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.listBindings(" + name + ')');
   
    CompositeName queryPath = merge(contextPath, name);
    JndiReply reply = connection.invoke(new ListBindingsRequest(queryPath));
    if (reply instanceof JndiError) {
      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
      throw exc;
    }
View Full Code Here

    } else if (request instanceof ListBindingsRequest) {
      Object obj = listBindings((ListBindingsRequest)request);
      return new ListBindingsReply((Binding[])obj);
    } else if (request instanceof ListRequest) {
      Object obj = list((ListRequest)request);
      return new ListReply((NameClassPair[])obj);
    } else {
      return new JndiError(
        new NamingException("Unknown operation"));
    }
  }
View Full Code Here

TOP

Related Classes of fr.dyade.aaa.jndi2.distributed.DistributedJndiServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.