Examples of MessageHandler


Examples of gcc.rmi.iiop.server.MessageHandler

            catch( Exception e )
            {
                e.printStackTrace();
            }

            MessageHandler mh;
            mh = MessageHandler.getInstance( li, s );
            mh.start();
        }
    }
View Full Code Here

Examples of it.sauronsoftware.junique.MessageHandler

  public static void main(String[] args) {
    String id = Textpad.class.getName();
    boolean start;
    try {
      JUnique.acquireLock(id, new MessageHandler() {
        public String handle(String message) {
          if (textpad != null) {
            textpad.open(message);
            textpad.toFront();
          }
View Full Code Here

Examples of javax.websocket.MessageHandler

                case PONG: {
                    if (pongMessageHandler != null) {
                        throw new IllegalStateException(
                                sm.getString("wsSession.duplicateHandlerPong"));
                    }
                    MessageHandler handler = mhResult.getHandler();
                    if (handler instanceof MessageHandler.Whole<?>) {
                        pongMessageHandler =
                                (MessageHandler.Whole<PongMessage>) handler;
                    } else {
                        throw new IllegalStateException(
View Full Code Here

Examples of javax.websocket.MessageHandler

        checkState();
        if (listener == null) {
            return;
        }

        MessageHandler wrapped = null;

        if (listener instanceof WrappedMessageHandler) {
            wrapped = ((WrappedMessageHandler) listener).getWrappedHandler();
        }

        if (wrapped == null) {
            wrapped = listener;
        }

        boolean removed = false;
        if (wrapped.equals(textMessageHandler) ||
                listener.equals(textMessageHandler)) {
            textMessageHandler = null;
            removed = true;
        }
View Full Code Here

Examples of javax.websocket.MessageHandler

        final String message = data.getData();
        session.getContainer().invokeEndpointMethod(executor, new Runnable() {
            @Override
            public void run() {
                MessageHandler mHandler = handler.getHandler();
                try {

                    if (mHandler instanceof MessageHandler.Partial) {
                        if (handler.getMessageType() == String.class) {
                            ((MessageHandler.Partial) handler.getHandler()).onMessage(message, finalFragment);
View Full Code Here

Examples of javax.websocket.MessageHandler

                clientEndpointConfig,
                new URI("wss://localhost:" + getPort() +
                        TesterFirehoseServer.Config.PATH));

        // Process incoming messages very slowly
        MessageHandler handler = new SleepingText(5000);
        wsSession.addMessageHandler(handler);
        wsSession.getBasicRemote().sendText("Hello");

        // Wait long enough for the buffers to fill and the send to timeout
        int count = 0;
View Full Code Here

Examples of javax.websocket.MessageHandler

        final String message = data.getData();
        session.getContainer().invokeEndpointMethod(executor, new Runnable() {
            @Override
            public void run() {
                MessageHandler mHandler = handler.getHandler();
                try {

                    if (mHandler instanceof MessageHandler.Partial) {
                        if (handler.getMessageType() == String.class) {
                            ((MessageHandler.Partial) handler.getHandler()).onMessage(message, finalFragment);
View Full Code Here

Examples of net.sf.xbus.base.core.MessageHandler

          String key = Constants.LOCATION_INTERN + "_"
              + Constants.LAYER_TECHNICAL + "_"
              + Constants.PACKAGE_TECHNICAL_FILE + "_" + "1";

          MessageHandler msg = MessageHandler.getInstance("errors");
          String messageText = msg.getMessage(key, params);

          Trace.warn(messageText);
        }

      }
View Full Code Here

Examples of net.sf.xbus.base.core.MessageHandler

    String Layer = test.nextToken();
    String Package = test.nextToken();
    String Number = test.nextToken();

    // get the Message
    MessageHandler msg = MessageHandler.getInstance(basename);
    String messageText = msg.getMessageOptional(key, null);

    // get the Location
    String LocationInformation = null;
    if (Location.equals("I"))
    {
      LocationInformation = "Intern";
    } // if (Location.equals("I"))
    else if (Location.equals("E"))
    {
      LocationInformation = "Extern";
    } // if (Location.equals("E"))
    else
    {
      return "Wrong Location";
    }
    // get the Layer
    String LayerInformation = msg.getMessageOptional(Layer, null);

    // get the Package
    String PackageInformation = msg.getMessageOptional(Layer + "_"
        + Package, null);

    String informations = new StringBuffer(Location).append(" = ").append(
        LocationInformation).append(Constants.LINE_SEPERATOR).append(
        Layer).append(" = ").append(LayerInformation).append(
View Full Code Here

Examples of org.apache.hedwig.client.api.MessageHandler

                        @Override
                        public void operationFinished(Object ctx, Void resultOfOperation) {
                            if (LOGGER.isDebugEnabled())
                                LOGGER.debug("cross-region subscription done for topic " + topic.toStringUtf8());
                            try {
                                sub.startDelivery(topic, mySubId, new MessageHandler() {
                                    @Override
                                    public void deliver(final ByteString topic, ByteString subscriberId, Message msg,
                                    final Callback<Void> callback, final Object context) {
                                        // When messages are first published
                                        // locally, the PublishHandler sets the
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.