/*
(non-Javadoc)

@see org.restcomm.protocols.ss7.isup.ISUPMessageFactory#createIAM()
549064
@Override
    public InitialAddressMessage createIAM() {
        InitialAddressMessage msg = new InitialAddressMessageImpl(_IAM_HOLDER.mandatoryCodes,
                _IAM_HOLDER.mandatoryVariableCodes, _IAM_HOLDER.optionalCodes, _IAM_HOLDER.mandatoryCodeToIndex,
                _IAM_HOLDER.mandatoryVariableCodeToIndex, _IAM_HOLDER.optionalCodeToIndex);
        return msg;
    }
1297394
protected Message createMessage(ConnectionContext context, BasicMessage basicMessage) throws JMSException {
        return createMessage(context, basicMessage, null);
    }
829582
public final ControlAck createNewControlAck() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlAck");
    ControlAck msg = null;
    try {
      msg = new ControlAckImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlAck");
    return msg;
  }
376692
@Override
    public AnswerMessage createANM(int cic) {
        AnswerMessage msg = createANM();
        CircuitIdentificationCode code = this.parameterFactory.createCircuitIdentificationCode();
        code.setCIC(cic);
        msg.setCircuitIdentificationCode(code);
        return msg;
    }
253832
@Override
    public ObjectMessage createObjectMessage() throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createObjectMessage");

        ObjectMessage objectMessage = null;

        try {
            objectMessage = jmsSession.createObjectMessage();
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createObjectMessage", new Object[] { objectMessage });
        }

        return objectMessage;

    }
1117531
@Override
    public IQueueMessage<ID, DATA> createMessage(DATA content) {
        return messageFactory.createMessage(content);
    }
790374
@Override
    public PreReleaseInformationMessage createPRI() {
        PreReleaseInformationMessage msg = new PreReleaseInformationMessageImpl(_PRI_HOLDER.mandatoryCodes, _PRI_HOLDER.mandatoryVariableCodes,
                _PRI_HOLDER.optionalCodes, _PRI_HOLDER.mandatoryCodeToIndex, _PRI_HOLDER.mandatoryVariableCodeToIndex,
                _PRI_HOLDER.optionalCodeToIndex);
        return msg;
    }
1026362
def create(cls, interface_id, logical_interface_ref, **kw):
        
        data = {'inspect_unspecified_vlans': True,
                'logical_interface_ref': logical_interface_ref,
                'nicid': str(interface_id)}
        
        if 'reset_interface_nicid' in kw:
            data.update(reset_interface_nicid=kw.get('reset_interface_nicid'))

        return cls(data)
1327672
@Override
    public SuspendMessage createSUS() {
        SuspendMessage msg = new SuspendMessageImpl(_SUS_HOLDER.mandatoryCodes, _SUS_HOLDER.mandatoryVariableCodes,
                _SUS_HOLDER.optionalCodes, _SUS_HOLDER.mandatoryCodeToIndex, _SUS_HOLDER.mandatoryVariableCodeToIndex,
                _SUS_HOLDER.optionalCodeToIndex);

        return msg;
    }
1330182
public OverloadMessage createOLM(int cic) {
        OverloadMessage msg = createOLM();
        CircuitIdentificationCode code = this.parameterFactory.createCircuitIdentificationCode();
        code.setCIC(cic);
        msg.setCircuitIdentificationCode(code);
        return msg;
    }
79148
@Override
    public LoopbackAckMessage createLPA(int cic) {
        LoopbackAckMessage msg = createLPA();
        CircuitIdentificationCode code = this.parameterFactory.createCircuitIdentificationCode();
        code.setCIC(cic);
        msg.setCircuitIdentificationCode(code);
        return msg;
    }
442810
public final ControlSilence createNewControlSilence() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlSilence");
    ControlSilence msg = null;
    try {
      msg = new ControlSilenceImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlSilence");
    return msg;
  }
1251146
public static Outcome create(final Status status, final URI invocationID) {
        return create(status, invocationID, null, null);
    }
813811
@SuppressWarnings({ "unchecked", "rawtypes" })
  public OIndexInternal<?> create(final String iName, final OIndexDefinition iIndexDefinition, final ODatabaseRecord iDatabase,
      final String iClusterIndexName, final int[] iClusterIdsToIndex, final OProgressListener iProgressListener,
      final OStreamSerializer iValueSerializer) {
    acquireExclusiveLock();
    try {

      name = iName;
      configuration = new ODocument();

      indexDefinition = iIndexDefinition;

      if (iClusterIdsToIndex != null)
        for (final int id : iClusterIdsToIndex)
          clustersToIndex.add(iDatabase.getClusterNameById(id));

      if (indexDefinition != null) {
        if (indexDefinition instanceof ORuntimeKeyIndexDefinition) {
          map = new OMVRBTreeDatabaseLazySave<Object, T>(iClusterIndexName,
              ((ORuntimeKeyIndexDefinition) indexDefinition).getSerializer(), iValueSerializer, 1);
        } else {
          final OBinarySerializer<?> keySerializer;
          if (indexDefinition.getTypes().length > 1) {
            keySerializer = OCompositeKeySerializer.INSTANCE;
          } else {
            keySerializer = OBinarySerializerFactory.INSTANCE.getObjectSerializer(indexDefinition.getTypes()[0]);
          }
          map = new OMVRBTreeDatabaseLazySave<Object, T>(iClusterIndexName, (OBinarySerializer<Object>) keySerializer,
              iValueSerializer, indexDefinition.getTypes().length);
        }
      } else
        map = new OMVRBTreeDatabaseLazySave<Object, T>(iClusterIndexName, new OSimpleKeySerializer(), iValueSerializer, 1);

      installHooks(iDatabase);

      rebuild(iProgressListener);
      updateConfiguration();
    } catch (Exception e) {
      if (map != null)
        map.delete();
      if (e instanceof OIndexException)
        throw (OIndexException) e;

      throw new OIndexException("Cannot create the index '" + iName + "'", e);

    } finally {
      releaseExclusiveLock();
    }
    return this;
  }
825037
public void create()
          throws SIConnectionUnavailableException, SIConnectionDroppedException, SIErrorException
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "create");

      CommsByteBuffer request = getCommsByteBuffer();
      request.putShort(getConnectionObjectID());

      CommsByteBuffer reply = null;

      try
      {
         // Pass on call to server
         reply = jfapExchange(request,
                              JFapChannelConstants.SEG_CREATE_ORDER_CONTEXT,
                              JFapChannelConstants.PRIORITY_HIGH,
                              true);

         short err = reply.getCommandCompletionCode(JFapChannelConstants.SEG_CREATE_ORDER_CONTEXT_R);
         if (err != CommsConstants.SI_NO_EXCEPTION)
         {
            checkFor_SIConnectionUnavailableException(reply, err);
            checkFor_SIConnectionDroppedException(reply, err);
            checkFor_SIConnectionLostException(reply, err);
            checkFor_SIErrorException(reply, err);
            defaultChecker(reply, err);
         }

         short ocId = reply.getShort();
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Created the order proxy. ID: " + ocId);

         // Now save the id
         setProxyID(ocId);
      }
      catch (SIConnectionLostException e)
      {
         // No FFDC Code needed
         // Temporarily re-throw as dropped
         throw new SIConnectionDroppedException("", e);
      }
      finally
      {
         if (reply != null) reply.release();
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "create");
   }
1075125
@Override
    public ConsoleEditor create(String flavor, Terminal terminal, InputStream in, PrintStream out) throws EditorInitializationException {
        if (flavorMap.containsKey(flavor)) {
            Class<? extends ConsoleEditor> editorClass = flavorMap.get(flavor);
            try {
                return instantiate(editorClass, terminal, in, out);
            } catch (Exception e) {
                throw new EditorInitializationException("Failed to create Editor instance of class:" + editorClass.getName(), e);
            }
        } else {
            Class<? extends ConsoleEditor> editorClass = resolve(flavor);
            if (editorClass != null) {
                flavorMap.put(flavor, editorClass);
                return create(flavor, terminal);
            } else {
                throw new EditorInitializationException("Unknown flavor:" + flavor);
            }
        }
    }
323161
public static InternalEvent createActivityNotifyMessage(ActivityInstance ai,
            Integer eventType, String masterRequestId, String compCode) {
        InternalEvent event = new InternalEvent();
        event.workId = ai.getActivityId();
        event.transitionInstanceId = null;
        event.eventType = eventType;
        event.ownerType = OwnerType.PROCESS_INSTANCE;
        event.ownerId = ai.getProcessInstanceId();
        event.masterRequestId = masterRequestId;
        event.workInstanceId = ai.getId();
        event.completionCode = compCode;
        return event;
    }