ComponentManager.sendPacket
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.xmpp.component.ComponentManager.sendPacket (Showing top 9 results out of 315)

origin: org.igniterealtime/tinder

/**
 * Helper method to send packets.
 * 
 * @param packet
 *            The packet to send.
 */
protected void send(Packet packet) {
  try {
    compMan.sendPacket(this, packet);
  } catch (ComponentException e) {
    log.warn("(serving component '" + getName()
        + "') Could not send packet!", e);
  }
}
origin: net.gltd.gtms/gtmsutil

/**
 * Sends a packet to the component manager in the XMPP server.
 * 
 * @param packet
 *            packet to send.
 */
public void sendPacket(Packet packet) {
  try {
    getComponentManager().sendPacket(this, packet);
  } catch (Exception e) {
    logger.error(GtmsLog.exceptionToString(e));
  }
}
origin: net.gltd.gtms/gtmsutil

public void send(Packet packet) {
  try {
    logger.debug(packet.toXML());
    ComponentManagerFactory.getComponentManager().sendPacket(component, packet);
  } catch (ComponentException e) {
    logger.error(GtmsLog.exceptionToString(e));
  }
}
origin: net.gltd.gtms/gtmsutil

/**
 * Handles status requests sent to the packet handler. Reports back with the
 * status, description and dump of any problem as a Gtx message.
 * 
 * @param status
 *            the status to packetize.
 * @param to
 *            the jid requesting plugin status.
 */
public void send(GtmsStatus status, JID to) {
  try {
    ComponentManagerFactory.getComponentManager().sendPacket(component, getPacket(status, componentJID, to));
  } catch (ComponentException e) {
    logger.error(GtmsLog.exceptionToString(e));
  }
}
origin: net.gltd.gtms/gtmsutil

/**
 * Handles status requests sent to the packet handler. Reports back with the
 * status, description and dump of any problem as a Gtx IQ to the
 * IQ.getFrom().
 * 
 * @param status
 *            the status to packetize.
 * @param iq
 *            the original IQ requesting plugin status.
 */
public void send(GtmsStatus status, IQ iq) {
  try {
    ComponentManagerFactory.getComponentManager().sendPacket(component, getPacket(status, iq));
  } catch (ComponentException e) {
    logger.error(GtmsLog.exceptionToString(e));
  }
}
origin: net.gltd.gtms/gtmsutil

/**
 * Handles requests sent to the packet handler. Reports back with the call
 * event.
 * 
 * @param callCollection
 *            the collection of calls to packetize.
 * @param to
 *            the jid requesting plugin status.
 */
public void send(GtxCallCollection callCollection, JID to, String systemId, String systemUid, String deviceName) {
  try {
    ComponentManagerFactory.getComponentManager().sendPacket(component, getPacket(callCollection, componentJID, to, systemId, systemUid, deviceName));
    callCollection.clearNotificationState();
  } catch (ComponentException e) {
    logger.error(GtmsLog.exceptionToString(e));
  }
}
origin: net.gltd.gtms/gtmsutil

public Response answerTimeout() {
  BaseResponse response = new BaseResponse();
  IQ reply = IQ.createResultIQ(iq);
  reply.setType(org.xmpp.packet.IQ.Type.error);
  PacketError error = new PacketError(org.xmpp.packet.PacketError.Condition.undefined_condition, org.xmpp.packet.PacketError.Type.cancel, "Timeout Error");
  reply.setError(error);
  response.setResponseType(ResponseType.ERROR);
  try {
    ComponentManagerFactory.getComponentManager().sendPacket(component, reply);
    response.setResponseType(ResponseType.OK);
    setExecuted(true);
  } catch (ComponentException e) {
    logger.error(GtmsLog.exceptionToString(e));
  }
  return response;
}
origin: net.gltd.gtms/gtmsutil

@Override
public Response execute() throws ActionExecutionException {
  BaseResponse response = new BaseResponse();
  IQ reply = IQ.createResultIQ(iq);
  if (resultBody != null) {
    reply.setType(org.xmpp.packet.IQ.Type.result);
    reply.setChildElement(resultBody);
  } else {
    reply.setType(org.xmpp.packet.IQ.Type.error);
    PacketError error = new PacketError(org.xmpp.packet.PacketError.Condition.undefined_condition, org.xmpp.packet.PacketError.Type.cancel, "Timeout Error");
    reply.setError(error);
    response.setResponseType(ResponseType.ERROR);
  }
  try {
    ComponentManagerFactory.getComponentManager().sendPacket(component, reply);
    response.setResponseType(ResponseType.OK);
    setExecuted(true);
  } catch (ComponentException e) {
    throw new ActionExecutionException(e);
  }
  return response;
}
origin: igniterealtime/Openfire-Meetings

componentManager.sendPacket(this, reply);
org.xmpp.componentComponentManagersendPacket

Javadoc

Sends a packet to the XMPP server. The "from" value of the packet must not be null. An IllegalArgumentException will be thrown when the "from" value is null.

Components are trusted by the server and may use any value in from address. Usually the from address uses the component's address as the domain but this is not required.

Popular methods of ComponentManager

  • addComponent
    Adds a component. The Component#initialize(org.xmpp.packet.JID,ComponentManager)method will be calle
  • removeComponent
    Removes a component. The Component#shutdown method will be called on the component.
  • getServerName
    Returns the domain of the XMPP server. The domain name may be the IP address or the host name.

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JPanel (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)