当前位置: 首页>>代码示例>>Java>>正文


Java TException.printStackTrace方法代码示例

本文整理汇总了Java中org.apache.thrift.TException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java TException.printStackTrace方法的具体用法?Java TException.printStackTrace怎么用?Java TException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.thrift.TException的用法示例。


在下文中一共展示了TException.printStackTrace方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: listAlgorithms

import org.apache.thrift.TException; //导入方法依赖的package包/类
public Set<String> listAlgorithms(){
	Set<String> ret = null;
	try {
		ret = newClient().listAlgorithms();
		transport.close();
	} catch (TException x) {
		x.printStackTrace();
	}
	return ret;
}
 
开发者ID:kaichao,项目名称:algorithm.annotation,代码行数:11,代码来源:AlgorithmClient.java

示例2: describeAlgorithm

import org.apache.thrift.TException; //导入方法依赖的package包/类
public List<String> describeAlgorithm(String name){
	List<String> ret = null;
	try {
		ret = newClient().describeAlgorithm(name);
		transport.close();
	} catch (TException x) {
		x.printStackTrace();
	}
	return ret;
}
 
开发者ID:kaichao,项目名称:algorithm.annotation,代码行数:11,代码来源:AlgorithmClient.java

示例3: performAlgorithm

import org.apache.thrift.TException; //导入方法依赖的package包/类
public Object performAlgorithm(String name, Object... params) {
	Object ret = null;
	try {
		ret = KryoTool.toObject(newClient().performAlgorithm(name, KryoTool.toByteBuffer(params)));
		transport.close();
	} catch (TException x) {
		x.printStackTrace();
	}
	return ret;
}
 
开发者ID:kaichao,项目名称:algorithm.annotation,代码行数:11,代码来源:AlgorithmClient.java

示例4: getActorMessage

import org.apache.thrift.TException; //导入方法依赖的package包/类
public ActorMessage getActorMessage(byte[] buffer) {
    BaseByteArrayPacket packet = new BaseByteArrayPacket();
    packet.fromBinary(buffer);
    ActorMessage actorMessage = new ActorMessage();
    try {
        deserializer.deserialize(actorMessage, packet.toBinary());
    } catch (TException e) {
        e.printStackTrace();
    }
    return actorMessage;
}
 
开发者ID:zerosoft,项目名称:CodeBroker,代码行数:12,代码来源:ThriftSerializerFactory.java

示例5: getEventMessage

import org.apache.thrift.TException; //导入方法依赖的package包/类
public RemoteEventMessage getEventMessage(byte[] buffer) {
    RemoteEventMessage event = new RemoteEventMessage();
    try {
        deserializer.deserialize(event, buffer);
    } catch (TException e) {
        e.printStackTrace();
    }
    return event;
}
 
开发者ID:zerosoft,项目名称:CodeBroker,代码行数:10,代码来源:ThriftSerializerFactory.java

示例6: deserializeEventMessage

import org.apache.thrift.TException; //导入方法依赖的package包/类
public byte[] deserializeEventMessage(RemoteEventMessage event) {
    try {
        return serializer.serialize(event);
    } catch (TException e) {
        e.printStackTrace();
        return null;
    }
}
 
开发者ID:zerosoft,项目名称:CodeBroker,代码行数:9,代码来源:ThriftSerializerFactory.java

示例7: getActorMessageByteArray

import org.apache.thrift.TException; //导入方法依赖的package包/类
public byte[] getActorMessageByteArray(Operation operation, TBase<?, ?> base) {
    byte[] tbaseMessage = null;
    ActorMessage actorMessage = new ActorMessage();
    actorMessage.op = operation;
    try {
        actorMessage.messageRaw = getTbaseByteBuffer(base);
        tbaseMessage = getOnlySerializerByteArray(actorMessage);
    } catch (TException e) {
        e.printStackTrace();
    }
    return tbaseMessage;
}
 
开发者ID:zerosoft,项目名称:CodeBroker,代码行数:13,代码来源:ThriftSerializerFactory.java

示例8: send2SessionActor

import org.apache.thrift.TException; //导入方法依赖的package包/类
/**
 * 发送消息
 *
 * @param msg
 */
private void send2SessionActor(Object msg) {
    if (msg instanceof BaseByteArrayPacket) {
        ActorMessage message = new ActorMessage();

        byte[] binary = ((BaseByteArrayPacket) msg).toBinary();
        ByteBuffer buffer = ByteBuffer.allocate(binary.length);
        buffer.put(binary);
        buffer.flip();

        message.messageRaw = buffer;
        message.op = Operation.SESSION_RECIVE_PACKET;
        byte[] actorMessage;
        try {
            actorMessage = thriftSerializerFactory.getActorMessage(message);
            actorRef.tell(actorMessage, ActorRef.noSender());

            CObject newInstance = CObject.newInstance();
            newInstance.putInt(MonitorEventType.KEY, MonitorEventType.SESSEION_RECIVE_FLOW);
            newInstance.putLong(MonitorEventType.SESSION_ID, sessionId);
            newInstance.putDouble(MonitorEventType.SESSION_FLOW, binary.length);
            newInstance.putLong(MonitorEventType.SESSION_TIME, System.currentTimeMillis());
            AkkaUtil.getInbox().send(CodeBrokerSystem.getInstance().getMonitorManager(), newInstance);
        } catch (TException e) {
            e.printStackTrace();
        }

    }
}
 
开发者ID:zerosoft,项目名称:CodeBroker,代码行数:34,代码来源:NettyIoSession.java


注:本文中的org.apache.thrift.TException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。