Package fr.dyade.aaa.agent

Examples of fr.dyade.aaa.agent.AgentId


   * <p>
   * This request is acknowledged when destinated to a queue.
   */
  private void doReact(ConsumerDenyRequest req) {
    if (req.getQueueMode()) {
      AgentId qId = AgentId.fromString(req.getTarget());
      String id = req.getId();
      sendNot(qId, new DenyRequest(activeCtxId, req.getRequestId(), id));

      // Acknowledging the request, unless forbidden:
      if (!req.getDoNotAck())
View Full Code Here


   * This method sends a <code>fr.dyade.aaa.agent.DeleteNot</code> to the
   * destination and acknowledges the request.
   */
  private void doReact(TempDestDeleteRequest req) {
    // Removing the destination from the context's list:
    AgentId tempId = AgentId.fromString(req.getTarget());
    activeCtx.removeTemporaryDestination(tempId);

    // Sending the request to the destination:
    deleteTemporaryDestination(tempId);

View Full Code Here

   */
  private void doReact(XACnxRollback req) {
    Xid xid = new Xid(req.getBQ(), req.getFI(), req.getGTI());

    String queueName;
    AgentId qId;
    Vector ids;
    for (Enumeration queues = req.getQueues(); queues.hasMoreElements();) {
      queueName = (String) queues.nextElement();
      qId = AgentId.fromString(queueName);
      ids = req.getQueueIds(queueName);
View Full Code Here

  /**
   * Gets the identifier of the default administration topic on a given server.
   */
  public static AgentId getDefault(short serverId) {
    return new AgentId(serverId, serverId, AgentId.JoramAdminStamp);
  }
View Full Code Here

   * Gets the identifier of the default administration topic on the
   * current server.
   */
  public final static AgentId getDefault() {
    if (adminId == null)
      adminId = new AgentId(AgentServer.getServerId(), AgentServer.getServerId(), AgentId.JoramAdminStamp);
    return adminId;
  }
View Full Code Here

   * @see org.objectweb.joram.mom.proxies.ConnectionManager
   */
  private AgentId getProxyId(Identity identity,
                            String inaddr) throws Exception {

    AgentId userProxId = null;
    Identity userIdentity = (Identity) usersTable.get(identity.getUserName());
    if (userIdentity == null) {
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "User [" + identity.getUserName() + "] does not exist");
      throw new Exception("User [" + identity.getUserName() + "] does not exist");
View Full Code Here

   */ 
  private void handleAdminReply(AdminReplyNot not) {
    String requestId = not.getRequestId();
    if (requestId == null) return;

    AgentId replyTo = (AgentId) requestsTable.remove(requestId);
    if (replyTo == null) return;

    AdminReply reply;

    if (not instanceof GetRightsReplyNot)
View Full Code Here

    distributeReply(replyTo, requestId, reply);
  }

  private void handleGetProxyIdNot(GetProxyIdNot not) {
    try {
      AgentId proxyId = getProxyId(not.getIdentity(), not.getInAddr());
      not.Return(proxyId);
    } catch (Exception exc) {
      not.Throw(exc);
    }
  }
View Full Code Here

  private void handleGetProxyIdListNot(GetProxyIdListNot not) {
    List idList = new ArrayList();
    Iterator ids = proxiesTable.values().iterator();
    while (ids.hasNext()) {
      AgentId aid = (AgentId) ids.next();
      idList.add(aid);
    }
    AgentId[] res = (AgentId[]) idList.toArray(new AgentId[idList.size()]);
    not.Return(res);
  }
View Full Code Here

  private AdminReply doProcess(GetRightsReplyNot not) {
    Vector readers = not.getReaders();
    Vector writers = not.getWriters();

    String name;
    AgentId proxyId;
    GetRightsReply reply = new GetRightsReply(not.getSuccess(), not.getInfo(), not.isFreeReading(), not.isFreeWriting());

    for (Iterator names = proxiesTable.keySet().iterator(); names.hasNext();) {
      name = (String) names.next();
      proxyId = (AgentId) proxiesTable.get(name);

      if (readers.contains(proxyId))
        reply.addReader(name, proxyId.toString());
      if (writers.contains(proxyId))
        reply.addWriter(name, proxyId.toString());
    }
    return reply;
  }
View Full Code Here

TOP

Related Classes of fr.dyade.aaa.agent.AgentId

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.