All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.atmosphere.stomp.protocol.StompFormat Maven / Gradle / Ivy

/*
 * Copyright 2014 Jeanfrancois Arcand
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */


package org.atmosphere.stomp.protocol;

/**
 * 

* This interfaces defines methods that allows to convert a {@code String} object into a {@link Frame} object and vice-versa. *

* * @author Guillaume DROUET * @since 0.1 * @version 1.0 */ public interface StompFormat { /** *

* Takes the given {@code String} and converts it to a {@link Frame}. *

* * @param str the {@code String} representation * @return the frame * @throws ParseException if {@code String} is not correct */ Frame parse(String str) throws ParseException; /** *

* Takes the given {@link Frame} and converts it to a {@code String} representation. *

* * @param msg the frame * @return the {@code String} representation */ String format(Frame msg); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy