Examples of OctetString


Examples of com.turkcelltech.jac.OctetString

      date.set(Calendar.MILLISECOND, 232997);
      long millis=date.getTimeInMillis();
      long secends=millis/1000;
      millis=millis%1000;
      String utcTime=Long.toHexString(secends)+Long.toHexString(millis)+"0a";
      BerNode t=new OctetString(BytesUtil.fromHexString(utcTime));//new UTCTime(new Date());
      t.setTagClass(Tag.CONTEXT);
      t.setTagNumber(4);
      goose2.addElement(t);
      BerNode stNum=new ASN1Integer(10);
      stNum.setTagClass(Tag.CONTEXT);
      stNum.setTagNumber(5);
      goose2.addElement(stNum);
View Full Code Here

Examples of org.jsmpp.bean.OptionalParameter.OctetString

        }
        if (Int.class.equals(tag.type)) {
            return new Int(tagCode, content);
        }
        if (OctetString.class.equals(tag.type)) {
            return new OctetString(tagCode, content);
        }
        if (COctetString.class.equals(tag.type)) {
            return new COctetString(tagCode, content);
        }
        throw new IllegalArgumentException("Unsupported tag: " + tagCode);
View Full Code Here

Examples of org.jsmpp.bean.OptionalParameter.OctetString

        deliverSm.setDestAddrNpi(NumberingPlanIndicator.INTERNET.value());
        deliverSm.setDestAddrTon(TypeOfNumber.NETWORK_SPECIFIC.value());
        deliverSm.setScheduleDeliveryTime("090831230627004+");
        deliverSm.setValidityPeriod("090901230627004+");
        deliverSm.setServiceType("WAP");
        deliverSm.setOptionalParametes(new OctetString(OptionalParameter.Tag.MESSAGE_PAYLOAD, "Hello SMPP world!"));
        SmppMessage smppMessage = binding.createSmppMessage(deliverSm);
       
        assertEquals("Hello SMPP world!", smppMessage.getBody());
        assertEquals(12, smppMessage.getHeaders().size());
        assertEquals(1, smppMessage.getHeader(SmppConstants.SEQUENCE_NUMBER));
View Full Code Here

Examples of org.jsmpp.bean.OptionalParameter.OctetString

        }
        if (Int.class.isAssignableFrom(tag.type)) {
            return new Int(tagCode, content);
        }
        if (OctetString.class.isAssignableFrom(tag.type)) {
            return new OctetString(tagCode, content);
        }
        if (COctetString.class.isAssignableFrom(tag.type)) {
            return new COctetString(tagCode, content);
        }
        throw new IllegalArgumentException("Unsupported tag: " + tagCode);
View Full Code Here

Examples of org.jsmpp.bean.OptionalParameter.OctetString

        deliverSm.setSourceAddr("1818");
        deliverSm.setDestAddress("1919");
        deliverSm.setScheduleDeliveryTime("090831230627004+");
        deliverSm.setValidityPeriod("090901230627004+");
        deliverSm.setServiceType("WAP");
        deliverSm.setOptionalParametes(new OctetString(OptionalParameter.Tag.MESSAGE_PAYLOAD, "Hello SMPP world!"));
        SmppMessage smppMessage = binding.createSmppMessage(deliverSm);
       
        assertEquals("Hello SMPP world!", smppMessage.getBody());
        assertEquals(8, smppMessage.getHeaders().size());
        assertEquals(1, smppMessage.getHeader(SmppBinding.SEQUENCE_NUMBER));
View Full Code Here

Examples of org.snmp4j.smi.OctetString

  public SnmpAgent()
      throws IOException
  {
    super(new File("snmpAgentBC.cfg"),
          null,
          new CommandProcessor(new OctetString(MPv3.createLocalEngineID())));
    setSysDescr(new OctetString("Cipango-" + Server.getSipVersion()));
    setSysOID(NEXCOM_ENTREPRISE_OID);
    agent = new CommandProcessor(new OctetString(MPv3.createLocalEngineID()));
  }
View Full Code Here

Examples of org.snmp4j.smi.OctetString

  }
 
  protected void addCommunities(SnmpCommunityMIB communityMIB)
  {
    Variable[] com2sec = new Variable[]
    { new OctetString("public"), // community name
        new OctetString("public"), // security name
        getAgent().getContextEngineID(), // local engine ID
        new OctetString(), // default context name
        new OctetString(), // transport tag
        new Integer32(StorageType.nonVolatile), // storage type
        new Integer32(RowStatus.active) // row status
    };
    MOTableRow row = communityMIB.getSnmpCommunityEntry().createRow(
        new OctetString("public2public").toSubIndex(true), com2sec);
    communityMIB.getSnmpCommunityEntry().addRow(row);
  }
View Full Code Here

Examples of org.snmp4j.smi.OctetString

  protected void addNotificationTargets(SnmpTargetMIB targetMIB,
      SnmpNotificationMIB notificationMIB)
  {
    targetMIB.addDefaultTDomains();

    notificationMIB.addNotifyEntry(new OctetString("default"),
        new OctetString("notify"),
        SnmpNotificationMIB.SnmpNotifyTypeEnum.trap,
        StorageType.permanent);

    for (int i = 0; i < _trapReceivers.length; i++)
    {
      addTrapHost(_trapReceivers[i]);
    }
   
    targetMIB.addTargetParams(new OctetString("v2c"),
                MessageProcessingModel.MPv2c,
                SecurityModel.SECURITY_MODEL_SNMPv2c,
                new OctetString("public"),
                SecurityLevel.NOAUTH_NOPRIV,
                StorageType.permanent);
  }
View Full Code Here

Examples of org.snmp4j.smi.OctetString

      if (address.isUdp())
        transportIpAddress = new UdpAddress(address.getInetAddress(), address.getPort());
      else
        transportIpAddress = new TcpAddress(address.getInetAddress(), address.getPort());
 
      snmpTargetMIB.addTargetAddress(new OctetString("notification" + address.getHost()),
          address.getTransportDomain(),
          new OctetString(transportIpAddress.getValue()),
          200, 1,
          new OctetString("notify"),
          new OctetString("v2c"),
          StorageType.permanent);

      Log.info("Add SNMP trap receiver: " + address);
    }
    catch (Exception e)
View Full Code Here

Examples of org.snmp4j.smi.OctetString

    }
  }

  protected void addUsmUser(USM usm)
  {
     UsmUser user = new UsmUser(new OctetString("SHADES"),
                 AuthSHA.ID,
                 new OctetString("SHADESAuthPassword"),
                 PrivDES.ID,
                 new OctetString("SHADESPrivPassword"));
    usm.addUser(user.getSecurityName(), usm.getLocalEngineID(), user);
    user = new UsmUser(new OctetString("TEST"),
                     AuthSHA.ID,
                     new OctetString("maplesyrup"),
                     PrivDES.ID,
                     new OctetString("maplesyrup"));
    usm.addUser(user.getSecurityName(), usm.getLocalEngineID(), user);
    user = new UsmUser(new OctetString("SHA"),
                     AuthSHA.ID,
                     new OctetString("SHAAuthPassword"),
                     null,
                     null);
    usm.addUser(user.getSecurityName(), usm.getLocalEngineID(), user);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.