public void startActivity(CAPDialogWrapper capDialogWrapper) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { this.sleeEndpoint.startActivity(capDialogWrapper.getActivityHandle(), capDialogWrapper, ACTIVITY_FLAGS); }
/** * Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map. * * @param ac the activity that has been created */ private void addActivity(DiameterActivity ac, boolean suspended) { try { // Inform SLEE that Activity Started DiameterActivityImpl activity = (DiameterActivityImpl) ac; if (suspended) { sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } else { sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } // Put it into our activites map activities.put(activity.getActivityHandle(), activity); if(tracer.isInfoEnabled()) { tracer.info("Activity started [" + activity.getActivityHandle() + "]"); } } catch (Exception e) { tracer.severe("Error creating activity", e); //FIXME: invalidate session? throw new RuntimeException("Error creating activity", e); } }
/** * Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map. * * @param ac the activity that has been created */ private void addActivity(DiameterActivity ac, boolean suspended) { try { // Inform SLEE that Activity Started DiameterActivityImpl activity = (DiameterActivityImpl) ac; if (suspended) { sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } else { sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } // Put it into our activites map activities.put(activity.getActivityHandle(), activity); if(tracer.isInfoEnabled()) { tracer.info("Activity started [" + activity.getActivityHandle() + "]"); } } catch (Exception e) { tracer.severe("Error creating activity", e); //FIXME: invalidate session? throw new RuntimeException("Error creating activity", e); } }
/** * Protected */ protected void startNewSmppServerTransactionActivity(SmppTransactionImpl txImpl) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { sleeEndpoint.startActivity(txImpl.getActivityHandle(), txImpl, ActivityFlags.REQUEST_ENDED_CALLBACK); }
/** * Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map. * * @param ac the activity that has been created */ private void addActivity(DiameterActivity ac, boolean suspended) { try { // Inform SLEE that Activity Started DiameterActivityImpl activity = (DiameterActivityImpl) ac; if (suspended) { sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } else { sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } // Set the listener activity.setSessionListener(this); // Put it into our activities map activities.put(activity.getActivityHandle(), activity); if(tracer.isInfoEnabled()) { tracer.info("Activity started [" + activity.getActivityHandle() + "]"); } } catch (Exception e) { tracer.severe("Error creating activity", e); throw new RuntimeException("Error creating activity", e); } }
public void startActivity(CAPDialogWrapper capDialogWrapper) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { this.sleeEndpoint.startActivity(capDialogWrapper.getActivityHandle(), capDialogWrapper, ACTIVITY_FLAGS); }
/** * Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map. * * @param ac the activity that has been created */ private void addActivity(final DiameterActivity ac, boolean suspended) { try { // Inform SLEE that Activity Started final DiameterActivityImpl activity = (DiameterActivityImpl) ac; if (suspended) { sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } else { sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } // Set the listener activity.setSessionListener(this); // Put it into our activities map activities.put(activity.getActivityHandle(), activity); if (tracer.isInfoEnabled()) { tracer.info("Activity started [" + activity.getActivityHandle() + "]"); } } catch (Exception e) { tracer.severe("Error creating activity", e); throw new RuntimeException("Error creating activity", e); } }
protected void createDialogHandle(Dialog dialog) { DialogHandle handle = new DialogHandle(dialog); if (activities.putIfAbsent(handle, dialog) == null) { handlers.put(dialog.toString(), handle); try { sleeEndpoint.startActivity(handle,dialog,ActivityFlags.REQUEST_ENDED_CALLBACK); } catch (ActivityAlreadyExistsException e) { // logger.warning(e.getMessage(),e); } catch (Throwable e) { activities.remove(handle); // throw new XMPPException(e.getMessage(),e); } } }
/** * Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map. * * @param ac the activity that has been created */ private void activityCreated(DiameterActivity ac, boolean suspended) { try { // Inform SLEE that Activity Started DiameterActivityImpl activity = (DiameterActivityImpl) ac; if (suspended) { sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } else { sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } // Put it into our activites map activities.put(activity.getActivityHandle(), activity); if(tracer.isInfoEnabled()) { tracer.info("Activity started [" + activity.getActivityHandle() + "]"); } } catch (Exception e) { tracer.severe("Error creating/starting activity.", e); } }
public void startActivity(MAPDialogWrapper mapDialogWrapper) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { this.sleeEndpoint.startActivity(mapDialogWrapper.getActivityHandle(), mapDialogWrapper, ACTIVITY_FLAGS); }
/** * Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map. * * @param ac the activity that has been created */ private void addActivity(DiameterActivity ac, boolean suspended) { try { // Inform SLEE that Activity Started DiameterActivityImpl activity = (DiameterActivityImpl) ac; if (suspended) { sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } else { sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } // Set the listener activity.setSessionListener(this); // Put it into our activities map activities.put(activity.getActivityHandle(), activity); if(tracer.isInfoEnabled()) { tracer.info("Activity started [" + activity.getActivityHandle() + "]"); } } catch (Exception e) { tracer.severe("Error creating activity", e); throw new RuntimeException("Error creating activity", e); } }
public void startActivity(MAPDialogWrapper mapDialogWrapper) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { this.sleeEndpoint.startActivity(mapDialogWrapper.getActivityHandle(), mapDialogWrapper, ACTIVITY_FLAGS); }
/** * Method for performing tasks when activity is created, such as informing SLEE about it and storing into internal map. * * @param ac the activity that has been created */ private void activityCreated(DiameterActivity ac, boolean suspended) { try { // Inform SLEE that Activity Started DiameterActivityImpl activity = (DiameterActivityImpl) ac; if (suspended) { sleeEndpoint.startActivitySuspended(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } else { sleeEndpoint.startActivity(activity.getActivityHandle(), activity, MARSHALABLE_ACTIVITY_FLAGS); } // Put it into our activites map activities.put(activity.getActivityHandle(), activity); if(tracer.isInfoEnabled()) { tracer.info("Activity started [" + activity.getActivityHandle() + "]"); } } catch (Exception e) { tracer.severe("Error creating/starting activity.", e); } }
public void startActivity(TCAPDialogWrapper mapDialogWrapper) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { this.sleeEndpoint.startActivity(mapDialogWrapper.getActivityHandle(), mapDialogWrapper, ACTIVITY_FLAGS); }
/** * Protected Methods * * @throws StartActivityException * @throws SLEEException * @throws IllegalStateException * @throws NullPointerException * @throws ActivityAlreadyExistsException */ protected void startNewSmppTransactionActivity(SmppTransactionImpl txImpl) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { sleeEndpoint.startActivity(txImpl.getHandle(), txImpl, ActivityFlags.REQUEST_ENDED_CALLBACK); this.handleVsActivityMap.put(txImpl.getHandle(), txImpl); }
XmppConnection createActivity(String connectionID, XMPPConnection connection, XmppActivityHandle handle) throws XMPPException { XmppConnection activity = new XmppConnection(connectionID,connection); if (activities.putIfAbsent(handle,activity) == null) { try { sleeEndpoint.startActivity(handle,activity,ActivityFlags.REQUEST_ENDED_CALLBACK); } catch (ActivityAlreadyExistsException e) { log.warning(e.getMessage(),e); } catch (Throwable e) { activities.remove(handle); throw new XMPPException(e.getMessage(),e); } } return activity; }
/** * * @param tx */ protected boolean createTransactionHandle(AbstractTransaction tx) { TransactionHandle handle = new TransactionHandle(tx); handlers.put(tx.toString(), handle); activities.put(handle, tx); try { sleeEndpoint.startActivity(handle, tx); } catch (ActivityAlreadyExistsException e) { tracer.warning("Transaction " + tx + " already exists in SLEE, may be acceptable in a cluster env", e); } catch (Throwable e) { tracer.severe("Failed to add tx " + tx + " to SLEE activities", e); return false; } return true; }
public CircuitActivity createCircuitActivity(ISUPMessage arg0,int dpc) throws IllegalArgumentException, ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { ActivityHandle handle=new ISUPActivityHandle(CircuitActivity.generateTransactionKey(arg0.getCircuitIdentificationCode().getCIC(),dpc)); if(activities.containsKey(handle)) throw new ActivityAlreadyExistsException("Circuit activity already exists"); CircuitActivity activity = new CircuitActivity(arg0,dpc,this); handle = createActivityHandle(activity); sleeEndpoint.startActivity(handle, activity,ACTIVITY_FLAGS); activities.putIfAbsent(handle,activity); return activity; }
private TFTPTransfer createTransferActivity(TFTPPacket tftpPacket) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { TransferActivityImpl activity = new TransferActivityImpl(); TransferActivityHandle handle = new TransferActivityHandle(activity.getTransferID()); TFTPTransfer tt = new TFTPTransfer(tftpPacket, activity, mode_, maxTimeoutRetries_, socketTimeout_, this, trc); activity.setSource(tt); // lookup the activity and check if already exists if (activities.get(handle) == null) { activities.put(handle, activity); sleeEndpoint.startActivity(handle, activity); if (trc.isFineEnabled()) trc.fine("Started Tftp transfer activity: " + activity.getTransferID()); } else { throw new ActivityAlreadyExistsException( "Duplicate transfer activity id: " + activity); } return tt; }
private TFTPTransfer createTransferActivity(TFTPPacket tftpPacket) throws ActivityAlreadyExistsException, NullPointerException, IllegalStateException, SLEEException, StartActivityException { TransferActivityImpl activity = new TransferActivityImpl(); TransferActivityHandle handle = new TransferActivityHandle(activity.getTransferID()); TFTPTransfer tt = new TFTPTransfer(tftpPacket, activity, mode_, maxTimeoutRetries_, socketTimeout_, this, trc); activity.setSource(tt); // lookup the activity and check if already exists if (activities.get(handle) == null) { activities.put(handle, activity); sleeEndpoint.startActivity(handle, activity); if (trc.isFineEnabled()) trc.fine("Started Tftp transfer activity: " + activity.getTransferID()); } else { throw new ActivityAlreadyExistsException( "Duplicate transfer activity id: " + activity); } return tt; }