protected void log(final LinkStateChanged.State state) { final StringBuilder buffer = new StringBuilder(); // Start printing on a new line. buffer.append("\n"); // Log the message. switch (state) { case CLOSED: { buffer.append("Closed a link"); } case OPEN: { buffer.append("Opened a link"); } } if (primaryConnId != null && primaryEndpointId != null && secondaryConnId != null && secondaryEndpointId != null) { buffer.append(" with primary connection ID of ").append(primaryConnId.toString()); buffer.append(" secondary connection ID of ").append(secondaryConnId.toString()); buffer.append(" A primary endpoint ID of ").append(primaryEndpointId.toString()); buffer.append(" and a secondary endpoint ID of ").append(secondaryEndpointId.toString()); } logger.debug(buffer.toString()); } }
protected void log(final ConnectionStateChanged.State state) { final StringBuilder buffer = new StringBuilder(); // Start printing on a new line. buffer.append("\n"); // Log the message. switch (state) { case CLOSED: { buffer.append("Closed a connection"); } case HALF_OPEN: { buffer.append("Opened a connection halfway"); } case OPEN: { buffer.append("Opened a connection"); } } if (connId != null && endpointId != null) { buffer.append(" with ID ").append(connId.toString()).append(" "); buffer.append("to an endpoint with ID ").append(endpointId.toString()); } if(logger.isDebugEnabled()) { logger.debug(buffer.toString()); } } }
protected void log(final ConnectionStateChanged.State state) { final StringBuilder buffer = new StringBuilder(); // Start printing on a new line. buffer.append("\n"); // Log the message. switch (state) { case CLOSED: { buffer.append("Closed a connection"); } case HALF_OPEN: { buffer.append("Opened a connection halfway"); } case OPEN: { buffer.append("Opened a connection"); } } if (connId != null && endpointId != null) { buffer.append(" with ID ").append(connId.toString()).append(" "); buffer.append("to an endpoint with ID ").append(endpointId.toString()); } if(logger.isDebugEnabled()) { logger.debug(buffer.toString()); } } }
public String encodeEventName(EventName e) { StringBuffer s = new StringBuffer(""); s.append(e.getPackageName().toString()).append('/').append(e.getEventIdentifier().getName()); if (e.getConnectionIdentifier() != null) { s.append(AMPERSAND).append(e.getConnectionIdentifier().toString()); } if (e.getEventIdentifier().getParms() != null) { s.append('(').append(e.getEventIdentifier().getParms()).append(')'); } return s.toString(); }
public static int encode(byte[] destination,int offset,EventName eventName) { int totalLength=PackageNameHandler.encode(destination,offset,eventName.getPackageName()); destination[offset+totalLength]=StringFunctions.SLASH_BYTE; totalLength++; byte[] nameBytes=eventName.getEventIdentifier().getName().getBytes(); System.arraycopy(nameBytes, 0, destination, offset+totalLength, nameBytes.length); totalLength+=nameBytes.length; if(eventName.getConnectionIdentifier()!=null) { destination[offset+totalLength]=StringFunctions.AT_BYTE; totalLength++; byte[] connectionBytes=eventName.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionBytes, 0, destination, offset+totalLength, connectionBytes.length); totalLength+=connectionBytes.length; } return totalLength; }
public static int encode(byte[] destination,int offset,EventName eventName) { int totalLength=PackageNameHandler.encode(destination,offset,eventName.getPackageName()); destination[offset+totalLength]=StringFunctions.SLASH_BYTE; totalLength++; byte[] nameBytes=eventName.getEventIdentifier().getName().getBytes(); System.arraycopy(nameBytes, 0, destination, offset+totalLength, nameBytes.length); totalLength+=nameBytes.length; if(eventName.getConnectionIdentifier()!=null) { destination[offset+totalLength]=StringFunctions.AT_BYTE; totalLength++; byte[] connectionBytes=eventName.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionBytes, 0, destination, offset+totalLength, connectionBytes.length); totalLength+=connectionBytes.length; } return totalLength; }
public String encodeRequestedEvent(RequestedEvent evt) { StringBuffer s = new StringBuffer((evt.getEventName().getPackageName()).toString()).append("/").append( evt.getEventName().getEventIdentifier().getName()); if (evt.getEventName().getConnectionIdentifier() != null) { s.append(AMPERSAND).append(evt.getEventName().getConnectionIdentifier().toString()); } String parms = evt.getEventName().getEventIdentifier().getParms(); RequestedAction[] actions = evt.getRequestedActions(); if (actions != null) { String ac = encodeRequestedActions(actions); s.append(" (").append(ac).append(")"); } if (parms != null) { s.append(" (").append(parms).append(")"); } return s.toString(); }
String cid = (decdEventName.get(1).substring(pos + 1)).trim(); ConnectionIdentifier connectionIdentifier = null; if ((ConnectionIdentifier.AnyConnection).toString().equals(cid)) { connectionIdentifier = ConnectionIdentifier.AnyConnection; } else if ((ConnectionIdentifier.AllConnections).toString().equals(cid)) { connectionIdentifier = ConnectionIdentifier.AllConnections; } else {
byte[] connectionIdentifierBytes=evt.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length;
byte[] connectionIdentifierBytes=response.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length; array[totalLength++]=StringFunctions.TWO_BYTE; array[totalLength++]=StringFunctions.COLON_BYTE; byte[] connectionIdentifierBytes=response.getSecondConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length;
byte[] connectionIdentifierBytes=response.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length; array[totalLength++]=StringFunctions.TWO_BYTE; array[totalLength++]=StringFunctions.COLON_BYTE; byte[] connectionIdentifierBytes=response.getSecondConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length;
byte[] connectionIdentifierBytes=evt.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length;
byte[] connectionIdentifierBytes=evt.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length;
byte[] connectionIdentifierBytes=evt.getConnectionIdentifier().toString().getBytes(); System.arraycopy(connectionIdentifierBytes, 0, array,totalLength, connectionIdentifierBytes.length); totalLength+=connectionIdentifierBytes.length;
public void onCallTerminated(CustomEvent evt, ActivityContextInterface aci) { logger.info("Conference Terminated " + this.getEndpointIdentifier() + " Connection Id " + this.getConnectionIdentifier().toString() + " callId = " + this.getCallIdentifier().toString()); EndpointIdentifier endpointID = this.getEndpointIdentifier(); ConnectionIdentifier connectionID=this.getConnectionIdentifier(); DeleteConnection deleteConnection = new DeleteConnection(this, this.getCallIdentifier(), endpointID,connectionID); deleteConnection.setTransactionHandle(this.mgcpProvider.getUniqueTransactionHandler()); mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { deleteConnection }); }
public void onCallCreated(CustomEvent evt, ActivityContextInterface aci) { logger.info("Custom Event received Endpoint = " + evt.getEndpointID() + " Connection Id " + evt.getConnectionID().toString() + "Call Id = " + evt.getCallID().toString()); this.setEndpointIdentifier(evt.getEndpointID()); this.setConnectionIdentifier(evt.getConnectionID()); this.setCallIdentifier(evt.getCallID()); try { } catch (Exception e) { logger.severe("Error while receiving the Custom Event ", e); } }
this.setConnectionIdentifier(event.getConnectionIdentifier().toString()); String sdp = event.getLocalConnectionDescriptor().toString();
this.setConnectionIdentifier(connectionIdentifier.toString()); String sdp = event.getLocalConnectionDescriptor().toString();